3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compare_behaviour($arg1, $arg2) { static $test = 0; ++$test; $res1 = ($arg1 ?: $arg2); $res2 = ($arg1 or $arg2); if( $res1 === $res2 ){ echo "$test\n========\n"; var_dump($arg1, $arg2, $res1, $res2); } } compare_behaviour(false, true); compare_behaviour(0, 1); compare_behaviour(0, 0); compare_behaviour(NULL, []);

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.60.0070.00716.50
8.3.50.0090.00920.19
8.3.40.0130.01018.67
8.3.30.0140.00018.88
8.3.20.0040.00420.23
8.3.10.0040.00423.66
8.3.00.0060.00319.38
8.2.180.0100.00716.50
8.2.170.0140.00722.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00021.10
8.2.110.0090.00020.23
8.2.100.0000.01118.16
8.2.90.0030.00619.17
8.2.80.0040.00417.97
8.2.70.0000.00817.25
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0000.00718.16
8.2.30.0040.00418.02
8.2.20.0080.00017.77
8.2.10.0000.00718.13
8.2.00.0040.00417.82
8.1.280.0060.01325.92
8.1.270.0090.00023.91
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0000.01021.98
8.1.230.0080.00319.08
8.1.220.0000.00917.74
8.1.210.0050.00318.77
8.1.200.0040.00817.22
8.1.190.0040.00417.13
8.1.180.0050.00218.10
8.1.170.0000.00818.53
8.1.160.0070.00022.06
8.1.150.0030.00518.88
8.1.140.0070.00017.52
8.1.130.0000.00717.88
8.1.120.0000.00717.50
8.1.110.0000.00817.52
8.1.100.0000.00717.45
8.1.90.0000.00717.47
8.1.80.0030.00317.41
8.1.70.0000.00817.27
8.1.60.0030.00517.61
8.1.50.0000.00817.49
8.1.40.0030.00617.42
8.1.30.0000.00917.69
8.1.20.0040.00417.67
8.1.10.0000.00817.43
8.1.00.0050.00317.31
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0020.00517.17
8.0.260.0030.00317.27
8.0.250.0000.00716.81
8.0.240.0000.00616.96
8.0.230.0000.00716.95
8.0.220.0060.00016.91
8.0.210.0040.00416.95
8.0.200.0000.00817.00
8.0.190.0040.00416.86
8.0.180.0000.00716.96
8.0.170.0050.00316.95
8.0.160.0030.00316.85
8.0.150.0030.00316.94
8.0.140.0040.00416.85
8.0.130.0030.00313.40
8.0.120.0040.00416.69
8.0.110.0050.00216.81
8.0.100.0040.00416.75
8.0.90.0040.00417.01
8.0.80.0030.01216.88
8.0.70.0050.00216.77
8.0.60.0060.00316.73
8.0.50.0050.00316.85
8.0.30.0130.00817.05
8.0.20.0130.00617.40
8.0.10.0000.00717.00
8.0.00.0090.00716.75
7.4.330.0030.00315.16
7.4.320.0000.00616.54
7.4.300.0040.00416.57
7.4.290.0070.00016.58
7.4.280.0030.00516.53
7.4.270.0030.00316.44
7.4.260.0030.00316.42
7.4.250.0050.00316.56
7.4.240.0020.00516.63
7.4.230.0000.00716.35
7.4.220.0060.01316.68
7.4.210.0090.00616.53
7.4.200.0070.00016.61
7.4.160.0100.00716.71
7.4.150.0110.01117.40
7.4.140.0030.01317.86
7.4.130.0110.00716.45
7.4.120.0020.01516.61
7.4.110.0100.00716.32
7.4.100.0060.01516.62
7.4.90.0120.00416.47
7.4.80.0170.00619.39
7.4.70.0030.01516.72
7.4.60.0130.00416.44
7.4.50.0030.00516.49
7.4.40.0120.00916.49
7.4.30.0100.00716.63
7.4.00.0030.00714.58
7.3.330.0020.00213.35
7.3.320.0000.00613.38
7.3.310.0070.00016.19
7.3.300.0070.00016.42
7.3.290.0030.01216.36
7.3.280.0080.00916.36
7.3.270.0080.00817.40
7.3.260.0080.01116.40
7.3.250.0120.00616.50
7.3.240.0100.00716.45
7.3.230.0200.00316.70
7.3.210.0190.00416.45
7.3.200.0110.00719.39
7.3.190.0090.01316.52
7.3.180.0090.00916.58
7.3.170.0070.01016.52
7.3.160.0070.01016.36
7.2.330.0120.00616.79
7.2.320.0110.01116.67
7.2.310.0080.00816.61
7.2.300.0140.00316.76
7.2.290.0100.01316.60
7.1.70.0110.00417.21
7.1.60.0140.00319.40
7.1.50.0070.01316.70
7.1.00.0070.07322.37
7.0.200.0000.00816.52
7.0.140.0030.07322.04
7.0.60.0070.04320.03
7.0.50.0030.08017.89
7.0.40.0170.07720.26
7.0.30.0200.06720.32
7.0.20.0170.04720.17
7.0.10.0070.08320.10
7.0.00.0070.08320.07
5.6.280.0130.06320.92
5.6.210.0030.04720.77
5.6.200.0030.06318.17
5.6.190.0030.04720.33
5.6.180.3370.05020.64
5.6.170.0270.04720.47
5.6.160.0100.08020.52
5.6.150.0030.04018.24
5.6.140.0130.07718.11
5.6.130.0170.07318.22
5.6.120.0030.04020.69
5.6.110.0070.05720.98
5.6.100.0030.04020.99
5.6.90.0130.07021.12
5.6.80.0030.07020.38
5.5.350.0170.04020.35
5.5.340.0100.08017.95
5.5.330.0070.05320.41
5.5.320.0430.06720.27
5.5.310.0300.04720.30
5.5.300.0070.05017.92
5.5.290.0070.04017.93
5.5.280.0070.08320.77
5.5.270.0100.05020.85
5.5.260.0030.08720.88
5.5.250.0200.04320.55
5.5.240.0100.03020.04
5.4.450.0470.04719.57
5.4.440.0200.04719.54
5.4.430.0470.04319.54
5.4.420.0430.04319.30
5.4.410.0400.03319.54
5.4.400.0370.04718.95
5.4.390.0870.04719.15
5.4.380.0430.04318.62
5.4.370.0300.05718.80
5.4.360.0300.06718.69
5.4.350.0370.05018.73
5.4.340.0300.05018.58
5.4.320.0060.03612.50
5.4.310.0080.03512.50
5.4.300.0040.03712.51
5.4.290.0070.03612.50
5.4.280.0060.03412.39
5.4.270.0050.03612.39
5.4.260.0060.04112.39
5.4.250.0060.04212.40
5.4.240.0060.03712.39
5.4.230.0050.04112.39
5.4.220.0070.03712.39
5.4.210.0070.03512.39
5.4.200.0030.03912.39
5.4.190.0050.04612.39
5.4.180.0070.04112.38
5.4.170.0070.03812.39
5.4.160.0060.03712.39
5.4.150.0040.03712.39
5.4.140.0080.04112.07
5.4.130.0090.04412.06
5.4.120.0040.03512.02
5.4.110.0030.03812.01
5.4.100.0070.04712.01
5.4.90.0040.04212.01
5.4.80.0080.04412.01
5.4.70.0060.03412.01
5.4.60.0070.03412.01
5.4.50.0060.04112.01
5.4.40.0070.04111.99
5.4.30.0060.03811.99
5.4.20.0100.03311.99
5.4.10.0080.03212.00
5.4.00.0070.03311.48
5.3.290.0040.04012.80
5.3.280.0040.04312.71
5.3.270.0050.04312.73
5.3.260.0090.04212.72
5.3.250.0110.04112.71
5.3.240.0070.04512.72
5.3.230.0070.03512.71
5.3.220.0040.03912.68
5.3.210.0070.03812.68
5.3.200.0050.03712.68
5.3.190.0040.03912.68
5.3.180.0070.03612.67
5.3.170.0070.03512.67
5.3.160.0070.03512.68
5.3.150.0060.03612.68
5.3.140.0040.03712.66
5.3.130.0060.03812.66
5.3.120.0060.03712.66
5.3.110.0050.03912.66
5.3.100.0060.03612.12
5.3.90.0070.03512.10
5.3.80.0050.03712.09
5.3.70.0060.03612.10
5.3.60.0070.03512.08
5.3.50.0080.03712.02
5.3.40.0060.04012.02
5.3.30.0070.04011.98
5.3.20.0110.03211.77
5.3.10.0010.04011.73
5.3.00.0040.03911.72
5.2.170.0030.0329.22
5.2.160.0060.0299.21
5.2.150.0080.0289.21
5.2.140.0050.0299.21
5.2.130.0030.0299.17
5.2.120.0060.0269.17
5.2.110.0030.0309.18
5.2.100.0030.0299.18
5.2.90.0040.0379.18
5.2.80.0050.0299.17
5.2.70.0030.0409.17
5.2.60.0060.0299.13
5.2.50.0090.0359.10
5.2.40.0020.0309.07
5.2.30.0050.0299.05
5.2.20.0050.0319.04
5.2.10.0040.0298.95
5.2.00.0030.0308.81
5.1.60.0050.0258.09
5.1.50.0030.0268.08
5.1.40.0050.0238.07
5.1.30.0050.0248.42
5.1.20.0040.0268.44
5.1.10.0070.0258.17
5.1.00.0030.0278.16
5.0.50.0040.0246.64
5.0.40.0030.0216.50
5.0.30.0040.0316.31
5.0.20.0010.0226.28
5.0.10.0030.0206.26
5.0.00.0040.0306.25
4.4.90.0030.0164.78
4.4.80.0030.0154.75
4.4.70.0030.0154.76
4.4.60.0030.0184.75
4.4.50.0040.0144.77
4.4.40.0040.0244.71
4.4.30.0040.0144.76
4.4.20.0100.0134.84
4.4.10.0040.0214.85
4.4.00.0010.0274.76
4.3.110.0040.0144.67
4.3.100.0020.0154.66
4.3.90.0040.0134.64
4.3.80.0030.0304.59
4.3.70.0050.0124.63
4.3.60.0010.0164.63
4.3.50.0030.0154.63
4.3.40.0050.0214.54
4.3.30.0010.0183.30
4.3.20.0030.0153.27
4.3.10.0020.0153.24
4.3.00.0170.01715.64

preferences:
45.85 ms | 400 KiB | 5 Q