3v4l.org

run code in 300+ PHP versions simultaneously
<?php $corban_notice = false; if (!function_exists('cd')) { function cd($var) { global $corban_notice; if (!isset($var)) { if ($corban_notice) { echo 'Variable is not set'.PHP_EOL; $corban_notice = false; } else { echo 'Variable is NULL'.PHP_EOL; } } } } function corban_error_handler($errno , $errstr, $errfile, $errline) { global $corban_notice; if ( version_compare(PHP_VERSION, '5.0.0', '>=') ) { $file = new SplFileObject($errfile); $file->seek($errline-1); $c = substr(trim($file->current()), 0, 3); if ($c=='cd(' || $c=='cd ') { $corban_notice = true; } } return false; } set_error_handler ('corban_error_handler', E_NOTICE); var_dump($a); $b = null; cd($a); cd($b);

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.40.0070.00718.59
8.3.30.0100.00318.95
8.3.20.0080.00020.25
8.3.10.0000.00821.91
8.3.00.0040.00417.93
8.2.170.0090.00922.96
8.2.160.0070.01020.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.98
8.2.110.0030.00722.26
8.2.100.0060.00618.16
8.2.90.0040.00419.24
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0080.00018.03
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0040.00418.36
8.2.20.0000.00717.66
8.2.10.0040.00418.03
8.2.00.0000.00817.72
8.1.270.0080.00023.91
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00722.18
8.1.230.0040.00719.00
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0070.00417.35
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0000.00918.64
8.1.160.0030.00622.11
8.1.150.0000.00718.84
8.1.140.0060.00317.43
8.1.130.0030.00317.87
8.1.120.0030.00517.53
8.1.110.0040.00417.48
8.1.100.0040.00417.45
8.1.90.0000.00717.50
8.1.80.0000.00817.50
8.1.70.0030.00317.47
8.1.60.0090.00017.59
8.1.50.0000.00817.39
8.1.40.0040.00417.46
8.1.30.0060.00317.58
8.1.20.0000.00817.67
8.1.10.0020.00517.48
8.1.00.0030.00517.44
8.0.300.0040.00418.77
8.0.290.0080.00316.75
8.0.280.0030.00318.40
8.0.270.0000.00817.33
8.0.260.0000.00717.23
8.0.250.0070.00017.07
8.0.240.0060.00017.02
8.0.230.0070.00017.07
8.0.220.0000.00717.02
8.0.210.0040.00416.91
8.0.200.0030.00317.05
8.0.190.0040.00416.98
8.0.180.0080.00016.92
8.0.170.0000.00716.94
8.0.160.0070.00016.86
8.0.150.0060.00316.91
8.0.140.0000.00716.96
8.0.130.0030.00613.50
8.0.120.0040.00416.92
8.0.110.0040.00416.89
8.0.100.0040.00417.03
8.0.90.0030.00516.89
8.0.80.0110.00716.94
8.0.70.0050.00216.80
8.0.60.0000.00717.00
8.0.50.0000.00817.06
8.0.30.0090.01017.24
8.0.20.0130.00517.40
8.0.10.0070.00017.12
8.0.00.0070.01216.86
7.4.330.0000.00515.20
7.4.320.0040.00416.70
7.4.300.0040.00416.68
7.4.290.0040.00416.63
7.4.280.0050.00316.62
7.4.270.0020.00516.50
7.4.260.0000.00716.65
7.4.250.0000.00816.43
7.4.240.0030.00516.63
7.4.230.0070.00016.33
7.4.220.0070.02016.52
7.4.210.0110.00316.67
7.4.200.0050.00216.78
7.4.160.0100.00716.80
7.4.150.0160.00617.40
7.4.140.0130.00717.86
7.4.130.0090.00716.54
7.4.120.0100.00716.80
7.4.110.0100.01316.73
7.4.100.0090.01216.41
7.4.90.0140.00316.73
7.4.80.0120.00619.39
7.4.70.0080.01416.43
7.4.60.0030.01416.63
7.4.50.0030.00616.48
7.4.40.0120.00616.70
7.4.30.0100.00716.71
7.4.00.0060.01114.95
7.3.330.0060.00013.39
7.3.320.0000.00513.17
7.3.310.0040.00416.53
7.3.300.0030.00316.43
7.3.290.0060.00916.41
7.3.280.0100.00916.42
7.3.270.0100.01417.40
7.3.260.0120.00616.43
7.3.250.0160.00216.60
7.3.240.0090.00916.40
7.3.230.0080.00916.68
7.3.210.0120.00616.52
7.3.200.0080.00819.39
7.3.190.0080.01516.70
7.3.180.0130.00316.35
7.3.170.0120.00916.34
7.3.160.0080.00816.39
7.3.120.0090.00914.73
7.3.110.0070.00715.10
7.3.100.0130.00314.98
7.3.90.0090.00615.00
7.3.80.0030.00614.69
7.3.70.0040.00414.54
7.3.60.0050.00914.76
7.3.50.0030.01014.68
7.3.40.0060.00314.86
7.3.30.0040.00714.96
7.3.20.0060.01016.48
7.3.10.0100.00316.80
7.3.00.0040.00416.88
7.2.330.0090.00916.52
7.2.320.0130.01416.77
7.2.310.0060.01216.73
7.2.300.0090.01216.61
7.2.290.0000.01616.50
7.2.240.0070.01114.88
7.2.230.0090.00615.09
7.2.220.0100.00314.88
7.2.210.0060.00815.06
7.2.200.0030.00915.12
7.2.190.0030.01015.07
7.2.180.0030.00515.19
7.2.170.0120.00015.16
7.2.160.0110.00715.14
7.2.150.0070.00616.92
7.2.140.0000.01016.64
7.2.130.0030.00916.84
7.2.120.0040.01117.10
7.2.110.0040.01417.01
7.2.100.0030.01016.98
7.2.90.0070.01016.69
7.2.80.0100.00316.63
7.2.70.0090.00416.72
7.2.60.0080.00416.95
7.2.50.0000.00916.76
7.2.40.0030.00617.00
7.2.30.0120.00416.98
7.2.20.0100.00616.97
7.2.10.0080.00416.96
7.2.00.0030.00616.79
7.1.330.0040.00715.94
7.1.320.0030.00915.73
7.1.310.0080.00015.76
7.1.300.0000.01515.92
7.1.290.0030.00815.91
7.1.280.0030.00915.92
7.1.270.0030.01115.94
7.1.260.0100.00315.85
7.1.250.0070.00715.91
7.1.70.0000.01117.06
7.1.60.0130.01319.25
7.1.50.0060.01516.80
7.1.00.0100.07022.37
7.0.200.0030.00716.69
7.0.140.0070.09022.21
7.0.60.0100.07020.03
7.0.50.0100.07717.99
7.0.40.0100.07720.26
7.0.30.0170.04020.26
7.0.20.0300.08720.20
7.0.10.0030.07320.24
7.0.00.0170.04020.07
5.6.280.0100.08321.16
5.6.210.0100.06320.68
5.6.200.0030.04718.19
5.6.190.0030.05320.63
5.6.180.3830.04020.39
5.6.170.0300.08320.48
5.6.160.0070.06020.52
5.6.150.0070.05318.29
5.6.140.0070.04318.23
5.6.130.0000.09018.16
5.6.120.0030.08721.00
5.6.110.0030.09020.98
5.6.100.0100.07721.15
5.6.90.0070.07720.98
5.6.80.0070.04020.50
5.6.70.4030.03720.42
5.5.350.0330.07020.44
5.5.340.0130.07717.95
5.5.330.0070.04020.47
5.5.320.3130.04020.42
5.5.310.0200.05320.27
5.5.300.0030.04718.01
5.5.290.0070.08018.04
5.5.280.0070.06320.81
5.5.270.0070.05020.96
5.5.260.0170.07720.80
5.5.250.0100.06720.59
5.5.240.0200.05020.13
5.4.450.0830.03719.32
5.4.440.0430.04019.52
5.4.430.0870.02719.40
5.4.420.0570.04019.20
5.4.410.0170.04719.29
5.4.400.0770.04019.20
5.4.390.0470.03318.84
5.4.380.0970.06018.73
5.4.370.0670.05318.68
5.4.360.1100.07018.65
5.4.350.0800.07318.73
5.4.340.0700.04318.62
5.4.320.0070.04312.51
5.4.310.0070.03912.51
5.4.300.0070.03912.52
5.4.290.0050.04012.51
5.4.280.0070.03512.41
5.4.270.0050.04112.41
5.4.260.0060.03812.41
5.4.250.0100.03412.40
5.4.240.0060.04612.41
5.4.230.0060.03812.40
5.4.220.0090.04112.40
5.4.210.0060.03612.40
5.4.200.0060.03912.39
5.4.190.0070.03512.39
5.4.180.0050.03712.39
5.4.170.0050.03712.40
5.4.160.0070.03612.40
5.4.150.0040.03912.39
5.4.140.0070.03612.08
5.4.130.0070.03912.06
5.4.120.0080.03612.03
5.4.110.0080.03312.02
5.4.100.0060.03612.03
5.4.90.0060.03812.02
5.4.80.0080.03412.02
5.4.70.0080.03312.02
5.4.60.0070.03212.02
5.4.50.0060.03612.02
5.4.40.0050.03612.01
5.4.30.0060.03612.00
5.4.20.0050.04512.01
5.4.10.0070.03512.00
5.4.00.0040.03811.49
5.3.290.0060.04012.80
5.3.280.0070.03912.71
5.3.270.0110.03412.73
5.3.260.0030.04312.72
5.3.250.0090.03512.72
5.3.240.0060.03812.72
5.3.230.0080.03712.71
5.3.220.0090.03612.68
5.3.210.0070.03912.68
5.3.200.0080.03512.68
5.3.190.0050.04312.68
5.3.180.0060.03812.67
5.3.170.0140.04412.67
5.3.160.0050.04012.67
5.3.150.0060.03912.68
5.3.140.0060.03712.66
5.3.130.0060.04012.66
5.3.120.0040.04212.66
5.3.110.0120.04512.66
5.3.100.0110.03212.13
5.3.90.0150.04212.11
5.3.80.0060.04512.10
5.3.70.0050.03712.10
5.3.60.0070.03712.09
5.3.50.0090.03712.04
5.3.40.0050.03812.04
5.3.30.0050.03612.00
5.3.20.0040.03811.77
5.3.10.0070.04411.74
5.3.00.0070.04811.73
5.2.170.0060.0329.23
5.2.160.0040.0309.23
5.2.150.0060.0299.23
5.2.140.0050.0319.23
5.2.130.0090.0269.18
5.2.120.0040.0299.19
5.2.110.0050.0299.19
5.2.100.0090.0269.19
5.2.90.0040.0309.19
5.2.80.0050.0329.18
5.2.70.0060.0289.18
5.2.60.0060.0299.14
5.2.50.0040.0319.11
5.2.40.0030.0309.09
5.2.30.0040.0329.06
5.2.20.0020.0339.05
5.2.10.0030.0308.96
5.2.00.0000.0388.82
5.1.60.0050.0248.10
5.1.50.0050.0258.10
5.1.40.0010.0308.08
5.1.30.0080.0268.44
5.1.20.0080.0308.45
5.1.10.0080.0238.18
5.1.00.0030.0278.18
5.0.50.0050.0206.65
5.0.40.0040.0206.51
5.0.30.0050.0306.33
5.0.20.0030.0206.29
5.0.10.0050.0186.27
5.0.00.0010.0336.27
4.4.90.0040.0144.78
4.4.80.0040.0144.75
4.4.70.0030.0164.75
4.4.60.0040.0204.75
4.4.50.0020.0204.77
4.4.40.0060.0224.71
4.4.30.0040.0144.75
4.4.20.0010.0184.84
4.4.10.0030.0164.85
4.4.00.0040.0244.76
4.3.110.0010.0184.67
4.3.100.0010.0174.67
4.3.90.0030.0144.63
4.3.80.0020.0254.58
4.3.70.0020.0154.63
4.3.60.0040.0194.63
4.3.50.0070.0124.62
4.3.40.0040.0234.54
4.3.30.0030.0163.31
4.3.20.0020.0163.29
4.3.10.0040.0143.25
4.3.00.0000.01715.26

preferences:
42.54 ms | 400 KiB | 5 Q