3v4l.org

run code in 300+ PHP versions simultaneously
<?php So the decision is between: function fooZoo() { static $array = array('...'); # ... } /*** and ***/ function fooZoo() { static $array; $array || $array = array('...'); # ... }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.140.0320.08612.04
5.4.130.0150.04412.03
5.4.120.0150.04311.99
5.4.110.0120.04511.98
5.4.100.0290.07611.99
5.4.90.0150.04411.98
5.4.80.0190.04211.98
5.4.70.0170.04311.98
5.4.60.0270.06211.98
5.4.50.0300.06011.98
5.4.40.0270.05911.97
5.4.30.0220.06711.96
5.4.20.0260.06411.96
5.4.10.0160.04311.96
5.4.00.0200.06811.46
5.3.240.0180.04312.72
5.3.230.0130.05412.71
5.3.220.0250.06412.68
5.3.210.0260.06712.68
5.3.200.0230.06812.68
5.3.190.0260.06412.68
5.3.180.0180.04312.67
5.3.170.0160.04512.67
5.3.160.0180.04412.68
5.3.150.0430.07812.67
5.3.140.0220.06712.66
5.3.130.0230.08012.66
5.3.120.0160.04312.66
5.3.110.0240.06712.66
5.3.100.0350.05712.12
5.3.90.0220.03812.08
5.3.80.0150.07612.08
5.3.70.0180.04312.08
5.3.60.0250.06512.06
5.3.50.0140.04612.00
5.3.40.0280.09112.00
5.3.30.0160.04111.94
5.3.20.0240.06511.71
5.3.10.0230.06411.67
5.3.00.0240.06711.66

preferences:
136.97 ms | 1394 KiB | 7 Q