3v4l.org

run code in 300+ PHP versions simultaneously
<?php function delta($prefix, $t1) { $t2 = microtime(true); printf("%s %0.6f\n", $prefix, ($t2 - $t1) * 1000); } function genarray() { $a = array(); for($i = 0; $i < 10000; $i++) { $a[] = $i; } return($a); } function noref($a) { for($i = 0; $i < 10000; $i++) { is_array($a); } } function byref($a) { for($i = 0; $i < 10000; $i++) { is_array(&$a); } } $a = genarray(); $t1 = microtime(true); noref($a); delta("NoRef:", $t1); $t3 = microtime(true); byref($a); delta("ByRef:", $t3);

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.230.0160.05214.64
5.4.220.0150.05314.54
5.4.210.0170.05114.63
5.4.200.0140.05113.86
5.4.190.0090.05514.59
5.4.180.0120.04514.60
5.4.170.0130.04614.60
5.4.160.0160.04114.62
5.4.150.0150.04514.55
5.4.140.0140.04413.54
5.4.130.0140.04613.52
5.4.120.0160.04013.51
5.4.110.0170.04413.52
5.4.100.0160.04913.47
5.4.90.0160.04513.47
5.4.80.0190.05213.45
5.4.70.0140.04313.53
5.4.60.0120.04813.45
5.4.50.0220.06413.48
5.4.40.0170.04913.49
5.4.30.0170.04813.49
5.4.20.0250.06113.50
5.4.10.0180.04613.46
5.4.00.0130.05112.95
5.3.290.0060.06415.95
5.3.280.0270.06415.53
5.3.270.0190.05015.60
5.3.260.0270.07315.54
5.3.250.0150.06115.59
5.3.240.0150.05115.52
5.3.230.0150.05315.53
5.3.220.0150.05315.50
5.3.210.0130.05815.54
5.3.200.0180.05115.48
5.3.190.0210.05715.52
5.3.180.0190.05915.60
5.3.170.0230.05015.53
5.3.160.0230.07215.54
5.3.150.0200.05315.49
5.3.140.0300.06515.50
5.3.130.0180.05715.47
5.3.120.0220.07215.52
5.3.110.0150.06115.54
5.3.100.0210.05214.99
5.3.90.0160.05715.00
5.3.80.0190.05614.96
5.3.70.0160.05714.98
5.3.60.0140.06214.90
5.3.50.0190.06214.89
5.3.40.0170.06314.93
5.3.30.0190.05414.87
5.3.20.0180.04714.61
5.3.10.0280.06114.55
5.3.00.0180.05514.58

preferences:
148.27 ms | 1394 KiB | 7 Q