4 ms·
Note that anywhere you see array() in that list for PHP 5.4 you can replace it with [ ]'s. So the example that has: $a = array(1,2,array(3,4)); becomes:
by rll 15y ago
Note that anywhere you see array() in that list for PHP 5.4 you can replace it with [ ]'s. So the example that has:
$a = array(1,2,array(3,4));
becomes:
$a = [1,2,[3,4]];
Also
0b101010
works in 5.4.
- Klinky 15y agoTrue, but PHP 5.4 doesn't even have a stable release yet & many people haven't even adopted 5.3.
- maratd 15y agoJust an FYI, but they are at the end of their testing the RC of 5.4, so it should be declared stable in about 2-3 weeks.
- robryan 15y ago5.3 Come out in 2009, I has a small list of backwards compatibility breaking changes (http://www.php.net/manual/en/migration53.incompatible.php http://www.php.net/manual/en/migration53.incompatible.php), no reason for anyone really not to have adopted it.
- mmj48 15y ago> many people haven't even adopted 5.3. > no reason for anyone really not to have adopted it. These things are not mutually exclusive. I.e. you could be write, but Klinky definitely is.
- robryan 15y agoTrue, I think it is a valid point for arguments about language features though. Fair enough to say that anything in 5.4 isn't production ready yet or had the time to trickle down to hosts but you can't judge PHP on versions before 5.3 as anyone can put a small amount of effort in and have everything 5.3 has to offer.
- creatio 15y agomy hosting is still on 5.2.17 and are in the "security testing" phase of 5.3.
- smsm42 15y agoI wonder what they mean by security testing? What exactly are they testing and how? BTW given that there's no security patches released for 5.2 anymore (while bugs are still being found and published of course) - their understanding of security is certainly unorthodox.
- creatio 15y agoI retract my security testing statement. The are currently testing if 5.3 is stable on their servers and have no ETA for the upgrade :-(. This was in mid October.
- robryan 15y agoI think this is more about not pissing off random untechnical customers that haven't bothered to update their off the shelf blogging software since 2005. Guess the tipping point is when they are losing more customers not upgrading than they will upgrading.
- wildtype 15y agoToday, PHP 5.4 are released as stable.
- Klinky 15y agoUntil it is ubiquitous, short syntax should still be used with caution.