3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; $c = 3; $d = 4; $e = 5; $start = microtime(true); for ( $i=0; $i<1000000; $i++ ){ if ( $a == 1 && $b == 2 && $c == 3 && $d == 4 && $e == 5 ) {} } echo $time_elapsed_secs = microtime(true) - $start . " | "; $start = microtime(true); for ( $i=0; $i<1000000; $i++ ){ if ( $a == 1 ){ if ( $b == 2 ) { if ( $c == 3 ) { if ( $d == 4 ) { if ( $e == 5 ) {} } } } } } echo $time_elapsed_secs = microtime(true) - $start;

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)
7.2.00.0100.10619.45
7.1.70.0000.09217.09
7.1.60.0100.13719.25
7.1.50.0030.14316.96
7.1.00.0070.26322.36
7.0.200.0670.08714.58
7.0.60.0070.17321.68
7.0.50.0130.09022.20
7.0.40.0070.14020.14
7.0.30.0030.10020.09
7.0.20.0030.10319.99
7.0.10.0030.10320.02
7.0.00.0030.10020.02
5.6.280.0000.33320.93
5.6.210.0070.28720.62
5.6.200.0170.20321.15
5.6.190.0130.20321.03
5.6.180.0000.17721.05
5.6.170.0000.17721.10
5.6.160.0000.17721.00
5.6.150.0030.22021.00
5.6.140.0070.17021.13
5.6.130.0000.29321.13
5.6.120.0030.23721.15
5.6.110.0170.25320.90
5.6.100.0000.26321.01
5.6.90.0030.26720.97
5.6.80.0000.24320.54
5.6.70.0070.27720.44
5.6.60.0070.26720.39
5.6.50.0200.26720.39
5.6.40.0030.26720.49
5.6.30.0030.26020.37
5.6.20.0100.24320.34
5.6.10.0070.26020.50
5.6.00.0100.25320.49
5.5.350.0030.27720.37
5.5.340.0200.17020.77
5.5.330.0000.17720.80
5.5.320.0030.17720.88
5.5.310.0070.17320.68
5.5.300.0000.27320.89
5.5.290.0000.18020.85
5.5.280.0100.27020.91
5.5.270.0070.25320.88
5.5.260.0100.27320.93
5.5.250.0100.21020.69
5.5.240.0100.22320.24
5.5.230.0070.26320.07
5.5.220.0030.27020.15
5.5.210.0070.21320.14
5.5.200.0070.27320.23
5.5.190.0030.27320.23
5.5.180.0030.21720.13
5.5.160.0000.24020.23
5.5.150.0070.27320.25
5.5.140.0070.27320.01
5.5.130.0070.25020.20
5.5.120.0070.26020.04
5.5.110.0000.25020.08
5.5.100.0070.23720.05
5.5.90.0000.27019.90
5.5.80.0100.24720.05
5.5.70.0070.28720.05
5.5.60.0070.25720.00
5.5.50.0030.26320.07
5.5.40.0070.27719.88
5.5.30.0100.25719.96
5.5.20.0070.26019.97
5.5.10.0030.21720.17
5.5.00.0100.26020.03

preferences:
40.85 ms | 403 KiB | 5 Q