3v4l.org

run code in 300+ PHP versions simultaneously
<?php $success=false; if (true) { set_error_handler(function($a, $b, $c, $d) { var_dump('error_handler', $a, $b, $c, $d); }); register_shutdown_function(function(){ if ($GLOBALS['success']){return;} var_dump('shutdown_function', error_get_last()); }); } $var = 1; try { // $var->method(); // Throws an Error object in PHP 7. $buf.='nyanpasu'; } catch (Error $e) { // Handle error var_dump('error', $e); } catch (Exception $e) { // Handle error var_dump('exception', $e); } $success=true; ?>

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.0090.00616.86
8.3.50.0130.00521.14
8.3.40.0250.00018.77
8.3.30.0110.00418.71
8.3.20.0080.00020.34
8.3.10.0040.00423.61
8.3.00.0090.00019.84
8.2.180.0100.01016.61
8.2.170.0070.00722.96
8.2.160.0100.00720.29
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0030.00620.93
8.2.120.0050.00326.35
8.2.110.0060.00319.27
8.2.100.0120.00018.03
8.2.90.0060.00317.97
8.2.80.0030.00617.97
8.2.70.0000.00917.63
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0060.00322.29
8.2.30.0060.00620.68
8.2.20.0000.00817.82
8.2.10.0050.00218.02
8.2.00.0040.00418.11
8.1.280.0070.00725.92
8.1.270.0000.00820.24
8.1.260.0000.00728.09
8.1.250.0070.00028.09
8.1.240.0040.00821.87
8.1.230.0040.00720.98
8.1.220.0040.00417.79
8.1.210.0040.00418.93
8.1.200.0080.00017.35
8.1.190.0040.00417.23
8.1.180.0030.00618.10
8.1.170.0050.00318.65
8.1.160.0040.00420.76
8.1.150.0040.00418.93
8.1.140.0040.00419.54
8.1.130.0030.00317.64
8.1.120.0000.00817.50
8.1.110.0060.00317.52
8.1.100.0030.00617.35
8.1.90.0000.00717.44
8.1.80.0000.00817.49
8.1.70.0000.00717.34
8.1.60.0040.00417.63
8.1.50.0080.00017.59
8.1.40.0030.00617.57
8.1.30.0050.00317.49
8.1.20.0000.00817.67
8.1.10.0030.00517.48
8.1.00.0040.00417.29
8.0.300.0000.00819.74
8.0.290.0040.00416.75
8.0.280.0030.00318.44
8.0.270.0030.00317.25
8.0.260.0000.00917.16
8.0.250.0000.00717.02
8.0.240.0000.00716.92
8.0.230.0000.00616.97
8.0.220.0050.00316.94
8.0.210.0020.00516.85
8.0.200.0070.00016.98
8.0.190.0030.00616.97
8.0.180.0020.00516.87
8.0.170.0000.00817.02
8.0.160.0040.00417.03
8.0.150.0000.00816.88
8.0.140.0030.00616.92
8.0.130.0000.00613.46
8.0.120.0000.00816.88
8.0.110.0040.00416.85
8.0.100.0000.00817.01
8.0.90.0070.00017.01
8.0.80.0070.01016.94
8.0.70.0040.00416.82
8.0.60.0000.00716.86
8.0.50.0000.00716.95
8.0.30.0110.00717.02
8.0.20.0130.00917.40
8.0.10.0040.00417.05
8.0.00.0130.00716.91
7.4.330.0000.00516.72
7.4.320.0070.00016.61
7.4.300.0050.00216.59
7.4.290.0040.00416.44
7.4.280.0000.01016.63
7.4.270.0000.00716.52
7.4.260.0030.00316.47
7.4.250.0000.00716.36
7.4.240.0060.00116.58
7.4.230.0000.00716.50
7.4.220.0150.01216.71
7.4.210.0060.00816.47
7.4.200.0030.00516.48
7.4.160.0090.00616.54
7.4.150.0030.01617.40
7.4.140.0170.00817.86
7.4.130.0060.01416.49
7.4.120.0140.00416.50
7.4.110.0070.01116.44
7.4.100.0090.00916.51
7.4.90.0060.01016.20
7.4.80.0150.00919.39
7.4.70.0170.00016.52
7.4.60.0130.00616.50
7.4.50.0030.01316.52
7.4.40.0130.00316.42
7.4.30.0190.00216.67
7.4.00.0070.01014.87
7.3.330.0000.00713.34
7.3.320.0000.00613.20
7.3.310.0030.00316.38
7.3.300.0050.00216.41
7.3.290.0100.00616.31
7.3.280.0090.00716.34
7.3.270.0150.00317.40
7.3.260.0140.00316.44
7.3.250.0120.00816.48
7.3.240.0080.00816.40
7.3.230.0060.01216.39
7.3.210.0100.00716.44
7.3.200.0090.00916.36
7.3.190.0090.00916.31
7.3.180.0100.00616.52
7.3.170.0130.00916.43
7.3.160.0110.00616.29
7.3.120.0090.00915.02
7.3.110.0030.01614.96
7.3.100.0090.00914.96
7.3.90.0070.01014.82
7.3.80.0040.00414.70
7.3.70.0030.01014.69
7.3.60.0090.00014.97
7.3.50.0070.00714.34
7.3.40.0090.00614.64
7.3.30.0040.00714.63
7.3.20.0030.01216.46
7.3.10.0070.00716.63
7.3.00.0110.00616.40
7.2.330.0110.00716.63
7.2.320.0070.01016.52
7.2.310.0110.01116.64
7.2.300.0100.00716.38
7.2.290.0100.01016.42
7.2.250.0030.01214.94
7.2.240.0040.01115.18
7.2.230.0000.01415.05
7.2.220.0070.01015.12
7.2.210.0000.01415.23
7.2.200.0070.00715.07
7.2.190.0150.00015.25
7.2.180.0030.01314.77
7.2.170.0110.00315.10
7.2.160.0070.00715.04
7.2.150.0080.00617.07
7.2.140.0030.01317.09
7.2.130.0030.00916.85
7.2.120.0070.00716.65
7.2.110.0090.00616.61
7.2.100.0100.00316.66
7.2.90.0060.00916.82
7.2.80.0030.01017.02
7.2.70.0030.01017.09
7.2.60.0030.01016.93
7.2.50.0030.01016.81
7.2.40.0030.00716.92
7.2.30.0040.01217.00
7.2.20.0100.00716.86
7.2.10.0030.01316.88
7.2.00.0100.00518.18
7.1.330.0060.01015.75
7.1.320.0070.00715.88
7.1.310.0040.00815.75
7.1.300.0130.00015.73
7.1.290.0060.00615.75
7.1.280.0080.00515.75
7.1.270.0030.00615.89
7.1.260.0030.00615.60
7.1.250.0060.00915.78
7.1.240.0000.01315.79
7.1.230.0070.00715.70
7.1.220.0040.01115.83
7.1.210.0030.00915.98
7.1.200.0030.01015.87
7.1.190.0060.00615.83
7.1.180.0030.01215.69
7.1.170.0000.01415.89
7.1.160.0000.01115.60
7.1.150.0070.00315.95
7.1.140.0000.01715.65
7.1.130.0100.00315.84
7.1.120.0030.00615.70
7.1.110.0070.00715.79
7.1.100.0070.01015.98
7.1.90.0030.01015.59
7.1.80.0040.00815.93
7.1.70.0050.00516.37
7.1.60.0030.01617.46
7.1.50.0130.01025.22
7.1.40.0070.00315.75
7.1.30.0040.01115.57
7.1.20.0000.01315.89
7.1.10.0040.01115.75
7.1.00.0000.04619.17
7.0.330.0000.01115.39
7.0.320.0000.01415.29
7.0.310.0040.01115.27
7.0.300.0090.00315.57
7.0.290.0070.01015.33
7.0.280.0060.00615.37
7.0.270.0080.00415.38
7.0.260.0100.00315.34
7.0.250.0000.01515.39
7.0.240.0070.00815.40
7.0.230.0060.00915.31
7.0.220.0030.00715.38
7.0.210.0000.01715.40
7.0.200.0150.00615.03
7.0.190.0060.00315.34
7.0.180.0100.00015.18
7.0.170.0110.00315.49
7.0.160.0070.01015.20
7.0.150.0070.00715.51
7.0.140.0060.00615.38
7.0.130.0060.00815.52
7.0.120.0130.00015.55
7.0.110.0050.00515.55
7.0.100.0030.01015.08
7.0.90.0090.00315.57
7.0.80.0030.00915.52
7.0.70.0000.00915.50
7.0.60.2380.02617.68
7.0.50.0050.03016.70
7.0.40.0070.04516.88
7.0.30.0080.03316.88
7.0.20.0180.03816.74
7.0.10.0050.03316.76
7.0.00.0080.02016.67
5.6.400.0060.00314.16
5.6.390.0060.00614.27
5.6.380.0080.00314.26
5.6.370.0030.00614.57
5.6.360.0040.01114.26
5.6.350.0070.01014.73
5.6.340.0060.00814.66
5.6.330.0070.00714.30
5.6.320.0070.00714.02
5.6.310.0080.00814.46
5.6.300.0060.00614.60
5.6.290.0030.00913.94
5.6.280.0070.02217.64
5.6.270.0080.00414.36
5.6.260.0030.00914.30
5.6.250.0000.01014.32
5.6.240.0070.00714.34
5.6.230.0090.00614.31
5.6.220.0030.01014.57
5.6.210.0050.04517.46
5.6.200.0100.02016.15
5.6.190.0080.02417.33
5.6.180.0090.04417.39
5.6.170.0170.04017.39
5.6.160.0030.02517.50
5.6.150.0050.03116.07
5.6.140.0070.04116.23
5.6.130.0030.02616.34
5.6.120.0080.03717.71
5.6.110.0080.04217.66
5.6.100.0120.03517.66
5.6.90.0030.04517.76
5.6.80.0110.03017.24
5.6.70.0070.00314.09
5.6.60.0070.01013.89
5.6.50.0030.01314.07
5.6.40.0100.00314.00
5.6.30.0100.00714.20
5.6.20.0060.01314.29
5.6.10.0000.01114.38
5.6.00.0030.01014.10
5.5.380.0080.00614.32
5.5.370.0030.01014.27
5.5.360.0090.00013.75
5.5.350.0070.03717.22
5.5.340.0050.04616.20
5.5.330.0070.04517.26
5.5.320.0130.02317.26
5.5.310.0220.03817.46
5.5.300.0020.04716.12
5.5.290.0020.02916.06
5.5.280.0030.04117.34
5.5.270.0070.02217.71
5.5.260.0030.03217.56
5.5.250.0110.03517.21
5.5.240.0090.03517.34
5.5.230.0040.00714.06
5.5.220.0000.01014.14
5.5.210.0030.00514.27
5.5.200.0060.00914.27
5.5.190.0070.01314.12
5.5.180.0000.01214.52
5.5.170.0040.00714.45
5.5.160.0030.01013.98
5.5.150.0040.00714.39
5.5.140.0060.00314.05
5.5.130.0080.00313.98
5.5.120.0080.00813.86
5.5.110.0040.00714.16
5.5.100.0000.01414.22
5.5.90.0060.00914.21
5.5.80.0070.00714.36
5.5.70.0040.00714.26
5.5.60.0030.01014.03
5.5.50.0030.01214.00
5.5.40.0090.00414.21
5.5.30.0040.01114.24
5.5.20.0030.00614.27
5.5.10.0030.00713.77
5.5.00.0030.00514.07

preferences:
51.5 ms | 401 KiB | 5 Q