3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; $c = 0; $d = $e = $f = -1; if ( $d = $c && $e = $b && $f = $a ) { echo "yes"; } var_dump($d, $e, $f); // Why isn't this a parse error?? It doesn't do: // $d = ($c && $e) = ($b && $f) = $a // (because that is a parse error on its own) // So what does it do?? echo "\n\n"; $d = $e = $f = -1; if ( $d = $c and $e = $b and $f = $a ) { echo "yes"; } var_dump($d, $e, $f); // ($d = $c) && ($e = $b) && ($f = $a) so only $d=$c is executed, bc $c is falsy echo "\n\n"; $d = $e = $f = -1; if ( $d = $a and $e = $b and $f = $c ) { echo "yes"; } var_dump($d, $e, $f); // ($d = $a) && ($e = $b) && ($f = $c) and all 3 are executed, bc first 2 are truthy

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)
8.3.130.0080.00018.47
8.3.120.0030.00518.91
8.3.110.0090.00020.94
8.3.100.0130.00324.06
8.3.90.0050.00326.77
8.3.80.0030.00716.88
8.3.70.0160.00616.58
8.3.60.0070.01116.50
8.3.50.0070.01221.22
8.3.40.0110.00318.75
8.3.30.0070.00718.54
8.3.20.0040.01120.34
8.3.10.0040.00421.73
8.3.00.0040.00419.56
8.2.250.0090.00616.43
8.2.240.0030.00619.09
8.2.230.0060.00322.58
8.2.220.0050.00337.54
8.2.210.0060.00326.77
8.2.200.0030.00616.38
8.2.190.0140.00716.75
8.2.180.0130.00625.92
8.2.170.0150.00718.96
8.2.160.0000.01420.52
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00017.75
8.2.110.0100.00021.05
8.2.100.0000.01119.23
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0060.00317.36
8.2.60.0080.00317.80
8.2.50.0030.00518.09
8.2.40.0040.00420.50
8.2.30.0040.00419.43
8.2.20.0070.00017.68
8.2.10.0030.00518.10
8.2.00.0000.00717.99
8.1.300.0040.00420.10
8.1.290.0030.00618.88
8.1.280.0140.00725.92
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.87
8.1.230.0040.00717.77
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0080.00017.00
8.1.180.0000.00818.10
8.1.170.0040.00418.46
8.1.160.0040.00420.93
8.1.150.0070.00018.87
8.1.140.0000.00817.46
8.1.130.0030.00517.76
8.1.120.0030.00417.36
8.1.110.0000.00717.42
8.1.100.0050.00317.46
8.1.90.0040.00417.47
8.1.80.0070.00017.44
8.1.70.0040.00417.48
8.1.60.0000.00817.51
8.1.50.0030.00517.50
8.1.40.0020.00517.50
8.1.30.0040.00417.62
8.1.20.0000.00717.64
8.1.10.0000.00917.56
8.1.00.0030.00617.35
8.0.300.0070.00018.77
8.0.290.0000.00816.71
8.0.280.0030.00318.44
8.0.270.0000.00717.13
8.0.260.0060.00018.48
8.0.250.0000.00816.95
8.0.240.0040.00416.95
8.0.230.0030.00317.02
8.0.220.0000.00716.75
8.0.210.0050.00216.87
8.0.200.0000.00716.84
8.0.190.0000.00916.96
8.0.180.0040.00416.75
8.0.170.0030.00616.93
8.0.160.0040.00416.76
8.0.150.0000.00716.72
8.0.140.0030.00316.80
8.0.130.0030.00313.30
8.0.120.0050.00316.89
8.0.110.0000.00716.79
8.0.100.0040.00416.73
8.0.90.0020.00516.73
8.0.80.0170.00316.83
8.0.70.0070.00016.75
8.0.60.0040.00416.82
8.0.50.0000.00816.87
8.0.30.0110.00817.20
8.0.20.0110.00717.40
8.0.10.0040.00416.82
8.0.00.0090.00916.67
7.4.330.0050.00015.08
7.4.320.0030.00316.60
7.4.300.0030.00316.65
7.4.290.0000.00716.53
7.4.280.0080.00016.50
7.4.270.0050.00216.61
7.4.260.0030.00316.39
7.4.250.0070.00016.45
7.4.240.0020.00516.46
7.4.230.0070.00016.30
7.4.220.0070.01016.63
7.4.210.0100.00516.68
7.4.200.0000.00716.59
7.4.160.0130.01016.41
7.4.150.0070.01017.40
7.4.140.0110.00817.86
7.4.130.0100.00816.45
7.4.120.0110.00516.33
7.4.110.0140.00316.52
7.4.100.0140.00516.64
7.4.90.0030.01316.65
7.4.80.0140.00619.39
7.4.70.0060.01516.43
7.4.60.0120.00516.39
7.4.50.0000.00716.50
7.4.40.0040.01316.51
7.4.30.0120.00616.30
7.4.00.0070.00914.88
7.3.330.0000.00713.03
7.3.320.0000.00512.94
7.3.310.0000.00716.04
7.3.300.0000.00716.21
7.3.290.0080.00916.17
7.3.280.0070.01216.19
7.3.270.0040.01417.40
7.3.260.0130.00416.17
7.3.250.0100.00816.48
7.3.240.0130.00316.35
7.3.230.0110.01216.39
7.3.210.0000.01816.30
7.3.200.0090.00616.36
7.3.190.0170.00616.50
7.3.180.0030.01216.40
7.3.170.0040.01316.38
7.3.160.0140.00416.44
7.3.120.0030.01114.80
7.3.110.0060.01114.76
7.3.100.0100.00414.80
7.3.90.0120.00414.78
7.3.80.0030.01114.75
7.3.70.0060.00314.85
7.3.60.0050.00914.86
7.3.50.0050.00614.56
7.3.40.0040.01114.53
7.3.30.0050.01014.68
7.3.20.0110.00316.67
7.3.10.0050.00816.59
7.3.00.0030.00916.51
7.2.330.0060.01216.71
7.2.320.0100.01016.64
7.2.310.0090.01216.67
7.2.300.0060.01116.68
7.2.290.0130.01116.61
7.2.250.0100.00814.97
7.2.240.0120.00915.04
7.2.230.0030.01015.07
7.2.220.0090.00514.97
7.2.210.0040.01114.87
7.2.200.0020.00915.03
7.2.190.0050.01014.88
7.2.180.0050.01114.73
7.2.170.0060.00714.89
7.2.60.0040.01116.78
7.2.00.0030.01019.00
7.1.330.0030.00915.77
7.1.320.0020.00915.70
7.1.310.0080.00515.82
7.1.300.0050.00815.68
7.1.290.0100.00715.72
7.1.280.0070.00515.72
7.1.270.0080.00815.70
7.1.260.0050.00415.65
7.1.200.0060.00615.68
7.1.100.0910.00416.10
7.1.70.0000.01317.13
7.1.60.0160.01020.03
7.1.50.0040.00716.70
7.1.00.0070.07322.37
7.0.200.0220.00914.62
7.0.60.0070.07719.94
7.0.50.0100.03717.80
7.0.40.0130.03720.21
7.0.30.0270.04320.00
7.0.20.0300.04020.13
7.0.10.0070.04020.38
7.0.00.0030.04020.14
5.6.280.0100.05320.89
5.6.210.0130.07320.72
5.6.200.0000.06318.15
5.6.190.0030.05320.41
5.6.180.0370.05320.61
5.6.170.0300.04720.41
5.6.160.0170.07720.41
5.6.150.0070.03318.18
5.6.140.0000.04018.10
5.6.130.0070.07318.18
5.6.120.0070.08721.03
5.6.110.0170.07721.08
5.6.100.0030.08721.00
5.6.90.0270.07020.88
5.6.80.0100.08320.53
5.5.350.2300.03020.37
5.5.340.0200.05317.89
5.5.330.0170.04720.36
5.5.320.0130.06320.50
5.5.310.0330.06720.17
5.5.300.0070.07717.98
5.5.290.0100.08318.02
5.5.280.0130.06020.88
5.5.270.0070.03720.97
5.5.260.0070.08720.80
5.5.250.0100.07720.68
5.5.240.0170.08320.27
5.4.450.0500.07019.37
5.4.440.0330.07019.13
5.4.430.0270.07019.18
5.4.420.0370.06319.41
5.4.410.0270.04319.06
5.4.400.0270.04018.79
5.4.390.0270.04318.79
5.4.380.0300.05718.81
5.4.370.0430.07018.99
5.4.360.0300.05018.81
5.4.350.0330.04719.06
5.4.340.0400.05318.91
5.4.320.0370.04018.99
5.4.310.0330.07019.09
5.4.300.0330.04718.85
5.4.290.0330.04718.86
5.4.280.0400.04319.00
5.4.270.0300.04019.01
5.4.260.0430.06719.01
5.4.250.0330.07719.01
5.4.240.0400.03018.98
5.4.230.0370.07019.07
5.4.220.0400.07019.07
5.4.210.0370.04018.75
5.4.200.0370.06718.84
5.4.190.0430.05719.05
5.4.180.0330.06318.95
5.4.170.0400.06718.98
5.4.160.0330.07019.06
5.4.150.0270.04718.79
5.4.140.0370.05716.25
5.4.130.0300.04316.26
5.4.120.0300.07716.17
5.4.110.0370.06016.42
5.4.100.0430.06316.39
5.4.90.0330.04716.34
5.4.80.0400.03016.46
5.4.70.0430.06016.20
5.4.60.0470.05316.47
5.4.50.0330.04716.36
5.4.40.0370.04716.28
5.4.30.0400.03016.18
5.4.20.0470.06016.46
5.4.10.0370.06716.34
5.4.00.0430.03315.81
5.3.290.0330.04314.59
5.3.280.0530.05014.53
5.3.270.0370.03314.55
5.3.260.0470.04714.61
5.3.250.0270.04014.46
5.3.240.0300.04014.46
5.3.230.0330.04714.59
5.3.220.0500.06014.66
5.3.210.0370.07314.52
5.3.200.0430.02714.54
5.3.190.0330.04714.41
5.3.180.0430.06714.61
5.3.170.0370.07014.59
5.3.160.0370.06714.42
5.3.150.0300.05714.41
5.3.140.0430.06714.53
5.3.130.0370.07014.39
5.3.120.0430.06314.63
5.3.110.0330.05714.42
5.3.100.0370.06713.89
5.3.90.0430.05013.87
5.3.80.0530.04313.96
5.3.70.0330.07313.96
5.3.60.0370.04713.85
5.3.50.0430.06314.04
5.3.40.0330.07013.80
5.3.30.0330.07013.70
5.3.20.0400.03713.53
5.3.10.0300.05713.53
5.3.00.0370.06713.68
5.2.170.0230.04311.00
5.2.160.0270.02711.19
5.2.150.0370.05011.07
5.2.140.0400.05311.03
5.2.130.0330.02010.95
5.2.120.0230.03710.94
5.2.110.0270.03710.93
5.2.100.0370.05010.98
5.2.90.0430.04311.04
5.2.80.0370.05310.94
5.2.70.0370.05710.93
5.2.60.0300.05010.93
5.2.50.0230.03310.86
5.2.40.0200.03010.90
5.2.30.0200.03011.06
5.2.20.0170.03310.83
5.2.10.0270.05311.01
5.2.00.0270.03310.66
5.1.60.0270.03710.04
5.1.50.0230.0509.96
5.1.40.0430.0339.95
5.1.30.0230.04010.30
5.1.20.0200.03310.27
5.1.10.0370.04710.15
5.1.00.0330.0479.93
5.0.50.0170.0378.50
5.0.40.0130.0438.33
5.0.30.0130.0608.17
5.0.20.0200.0338.36
5.0.10.0170.0438.09
5.0.00.0130.0638.10
4.4.90.0170.0307.84
4.4.80.0130.0237.84
4.4.70.0130.0177.84
4.4.60.0100.0237.84
4.4.50.0100.0307.84
4.4.40.0130.0507.84
4.4.30.0170.0307.84
4.4.20.0070.0207.84
4.4.10.0130.0177.84
4.4.00.0100.0307.84
4.3.110.0100.0207.84
4.3.100.0170.0337.84
4.3.90.0130.0207.84
4.3.80.0100.0537.84
4.3.70.0200.0237.84
4.3.60.0170.0307.84
4.3.50.0130.0277.84
4.3.40.0170.0377.84
4.3.30.0070.0277.84
4.3.20.0070.0377.84
4.3.10.0070.0377.84
4.3.00.0030.0237.84

preferences:
28.47 ms | 403 KiB | 5 Q