3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr, $errfile, $errline) { $namespace = 'ajf\ErrorExceptions\Dynamic'; $className = implode('', explode(' ', ucwords($errstr))); $fullClassName = $namespace . '\\' . $className; if (!class_exists($fullClassName)) { eval("namespace $namespace { class $className extends \ErrorException {} }"); } throw new $fullClassName($errstr, 0, $errno, $errfile, $errline); }); try { $foo = 1/0; } catch (ajf\ErrorExceptions\Dynamic\DivisionByZero $e) { echo "ba-da-bing, ba-da-boom: I caught a $e!\n"; } try { $repent = sin("123abc"); } catch (ajf\ErrorExceptions\Dynamic\ANonWellFormedNumericStringEncountered $e) { echo "praise be to zend_is_numeric_string_ex: $e"; }

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.88
8.3.50.0070.00716.21
8.3.40.0080.00818.79
8.3.30.0100.01418.71
8.3.20.0000.00820.18
8.3.10.0060.00321.90
8.3.00.0000.00821.90
8.2.180.0090.00616.88
8.2.170.0100.01022.96
8.2.160.0100.00320.28
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0050.00320.93
8.2.120.0040.00426.35
8.2.110.0100.00022.26
8.2.100.0060.00618.04
8.2.90.0000.00819.18
8.2.80.0080.00017.97
8.2.70.0000.00817.74
8.2.60.0030.00618.04
8.2.50.0030.00518.09
8.2.40.0060.00322.27
8.2.30.0000.00719.40
8.2.20.0040.00417.83
8.2.10.0000.00718.03
8.2.00.0040.00418.06
8.1.280.0090.01225.92
8.1.270.0060.01222.18
8.1.260.0090.00028.09
8.1.250.0000.00828.09
8.1.240.0090.00023.92
8.1.230.0040.00817.70
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0000.01117.48
8.1.190.0040.00417.00
8.1.180.0000.00718.10
8.1.170.0000.00818.59
8.1.160.0040.00420.79
8.1.150.0040.00418.96
8.1.140.0030.00619.52
8.1.130.0030.00617.84
8.1.120.0000.00717.55
8.1.110.0060.00317.54
8.1.100.0040.00417.41
8.1.90.0040.00417.50
8.1.80.0050.00217.48
8.1.70.0000.00717.43
8.1.60.0040.00417.51
8.1.50.0050.00317.60
8.1.40.0060.00317.53
8.1.30.0030.00617.70
8.1.20.0000.00817.64
8.1.10.0000.00817.52
8.1.00.0000.00717.57
8.0.300.0000.00918.77
8.0.290.0040.00416.75
8.0.280.0070.00018.40
8.0.270.0070.00017.18
8.0.260.0000.00617.22
8.0.250.0030.00317.01
8.0.240.0000.00816.91
8.0.230.0030.00317.02
8.0.220.0030.00316.77
8.0.210.0000.00816.84
8.0.200.0000.00616.93
8.0.190.0050.00316.92
8.0.180.0040.00416.92
8.0.170.0020.00516.89
8.0.160.0000.00816.97
8.0.150.0000.00716.96
8.0.140.0000.00716.97
8.0.130.0060.00013.44
8.0.120.0030.00716.95
8.0.110.0040.00416.91
8.0.100.0000.00716.88
8.0.90.0000.00716.83
8.0.80.0090.00616.93
8.0.70.0030.00516.97
8.0.60.0000.00716.92
8.0.50.0040.00416.92
8.0.30.0040.01217.24
8.0.20.0120.00917.40
8.0.10.0040.00416.98
8.0.00.0120.00716.73
7.4.330.0020.00216.66
7.4.320.0060.00016.55
7.4.300.0050.00316.59
7.4.290.0000.00816.62
7.4.280.0030.00516.53
7.4.270.0080.00016.55
7.4.260.0070.00016.45
7.4.250.0030.00316.43
7.4.240.0030.00316.47
7.4.230.0000.00716.73
7.4.220.0150.00916.50
7.4.210.0050.01016.64
7.4.200.0030.00316.57
7.4.160.0080.00816.50
7.4.150.0070.01017.40
7.4.140.0090.01417.86
7.4.130.0150.00616.57
7.4.120.0140.00516.68
7.4.110.0090.01516.65
7.4.100.0160.00616.54
7.4.90.0090.00916.57
7.4.80.0110.00619.39
7.4.70.0040.01316.55
7.4.60.0070.01016.49
7.4.50.0040.00816.36
7.4.40.0130.00316.81
7.4.30.0050.01416.71
7.4.10.0110.00714.96
7.4.00.0090.00915.07
7.3.330.0030.00513.58
7.3.320.0000.00513.71
7.3.310.0040.00416.80
7.3.300.0000.00616.69
7.3.290.0000.00716.85
7.3.280.0120.00716.63
7.3.270.0100.00717.40
7.3.260.0030.01516.68
7.3.250.0100.00616.68
7.3.240.0100.01016.73
7.3.230.0060.01216.81
7.3.210.0060.01216.77
7.3.200.0120.00619.39
7.3.190.0130.00516.64
7.3.180.0110.00616.82
7.3.170.0070.01416.75
7.3.160.0060.00916.61
7.3.130.0090.00915.25
7.3.120.0040.01415.14
7.3.110.0060.01314.98
7.3.100.0110.00415.22
7.3.90.0060.00915.34
7.3.80.0030.01014.98
7.3.70.0070.00714.95
7.3.60.0120.00415.25
7.3.50.0070.01115.34
7.3.40.0030.01015.16
7.3.30.0060.00615.13
7.3.20.0090.00617.05
7.3.10.0150.00317.13
7.3.00.0090.00316.92
7.2.330.0070.01116.84
7.2.320.0060.01316.82
7.2.310.0180.00416.96
7.2.300.0110.00616.76
7.2.290.0030.01316.73
7.2.260.0070.01115.32
7.2.250.0030.01315.25
7.2.240.0060.01015.34
7.2.230.0070.01115.18
7.2.220.0060.01015.07
7.2.210.0100.00715.32
7.2.200.0100.00615.32
7.2.190.0100.00615.53
7.2.180.0090.00615.46
7.2.170.0000.01315.54
7.2.160.0090.00915.23
7.2.150.0070.01117.20
7.2.140.0060.00917.17
7.2.130.0080.00417.45
7.2.120.0070.00717.36
7.2.110.0030.01317.19
7.2.100.0060.00917.18
7.2.90.0030.01017.42
7.2.80.0100.00617.14
7.2.70.0130.00617.38
7.2.60.0060.01117.25
7.2.50.0030.01017.27
7.2.40.0100.00317.26
7.2.30.0030.01217.43
7.2.20.0000.01517.23
7.2.10.0040.00817.21
7.2.00.0090.00918.56
7.1.330.0110.00316.15
7.1.320.0100.00715.94
7.1.310.0030.00616.16
7.1.300.0090.00616.09
7.1.290.0030.01216.02
7.1.280.0000.01016.12
7.1.270.0040.01115.98
7.1.260.0070.00416.27
7.1.250.0100.00316.17
7.1.240.0090.00615.99
7.1.230.0070.00316.21
7.1.220.0000.01216.20
7.1.210.0040.00716.15
7.1.200.0120.00616.04
7.1.190.0000.01415.86
7.1.180.0070.00715.78
7.1.170.0040.00815.90
7.1.160.0030.01016.13
7.1.150.0090.00916.18
7.1.140.0060.00315.89
7.1.130.0070.00416.25
7.1.120.0060.00916.08
7.1.110.0090.00316.18
7.1.100.0080.00517.25
7.1.90.0080.00415.91
7.1.80.0100.00716.10
7.1.70.0040.00616.80
7.1.60.0050.01117.75
7.1.50.0060.00516.89
7.1.40.0070.00316.31
7.1.30.0100.00716.08
7.1.20.0060.00916.06
7.1.10.0120.00316.02
7.1.00.0130.03219.38
7.0.330.0040.00415.76
7.0.320.0040.01115.77
7.0.310.0040.00815.69
7.0.300.0030.01015.80
7.0.290.0130.00315.73
7.0.280.0030.00615.58
7.0.270.0060.00315.62
7.0.260.0000.01015.71
7.0.250.0070.01015.66
7.0.240.0080.00415.53
7.0.230.0090.00615.83
7.0.220.0090.00015.65
7.0.210.0000.01315.79
7.0.200.0140.00915.55
7.0.190.0000.00815.80
7.0.180.0030.00615.59
7.0.170.0030.00715.63
7.0.160.0000.01615.79
7.0.150.0090.00315.84
7.0.140.0040.00715.88
7.0.130.0070.00615.79
7.0.120.0030.01315.80
7.0.110.0000.00915.81
7.0.100.0000.01215.70
7.0.90.0100.00315.83
7.0.80.0000.01415.75
7.0.70.0070.00715.85
7.0.60.0150.04018.90
7.0.50.0020.03316.98
7.0.40.0120.02616.99
7.0.30.0200.04017.02
7.0.20.0180.03717.07
7.0.10.0050.02616.97
7.0.00.0090.02616.99
5.6.400.0060.00614.74
5.6.390.0100.00314.82
5.6.380.0090.00614.64
5.6.370.0000.01414.76
5.6.360.0030.01014.77
5.6.350.0070.00314.64
5.6.340.0030.00814.56
5.6.330.0060.00614.66
5.6.320.0040.00714.96
5.6.310.0070.01014.52
5.6.300.0060.00914.86
5.6.290.0030.01214.66
5.6.280.0050.02418.10
5.6.270.0070.00714.70
5.6.260.0030.00915.00
5.6.250.0040.01114.66
5.6.240.0030.01014.49
5.6.230.0000.01014.88
5.6.220.0000.00914.47
5.6.210.0100.03517.91
5.6.200.0120.04216.45
5.6.190.0090.03517.70
5.6.180.0120.02417.66
5.6.170.0200.04617.83
5.6.160.0090.04317.76
5.6.150.0110.02016.56
5.6.140.0080.04216.47
5.6.130.0050.03816.65
5.6.120.0050.02618.04
5.6.110.0110.03218.03
5.6.100.0070.04317.98
5.6.90.0090.02817.91
5.6.80.0090.03017.50
5.6.70.0110.00414.91
5.6.60.0070.00714.57
5.6.50.0070.00714.61
5.6.40.0090.00914.54
5.6.30.0080.00814.43
5.6.20.0130.00014.57
5.6.10.0090.00614.56
5.6.00.0090.00614.59
5.5.380.0000.01314.80
5.5.370.0060.00614.54
5.5.360.0070.00714.33
5.5.350.0070.04217.62
5.5.340.0020.05116.37
5.5.330.0070.04717.48
5.5.320.0290.04117.53
5.5.310.0150.04217.54
5.5.300.0060.02116.52
5.5.290.0050.03016.48
5.5.280.0080.04218.00
5.5.270.0020.04617.80
5.5.260.0080.04717.97
5.5.250.0060.04017.75
5.5.240.0120.01817.49
5.5.230.0040.00714.67
5.5.220.0110.00414.65
5.5.210.0090.00914.64
5.5.200.0060.00614.57
5.5.190.0080.00814.56
5.5.180.0100.00314.54
5.5.170.0090.00614.39
5.5.160.0030.01314.54
5.5.150.0060.01014.42
5.5.140.0000.01714.19
5.5.130.0040.00814.84
5.5.120.0030.00614.84
5.5.110.0060.00614.73
5.5.100.0060.00914.44
5.5.90.0120.00414.64
5.5.80.0110.00414.56
5.5.70.0070.00714.53
5.5.60.0000.01014.69
5.5.50.0030.00614.59
5.5.40.0000.01314.47
5.5.30.0000.01414.73
5.5.20.0100.00314.61
5.5.10.0070.01014.61
5.5.00.0070.00714.61

preferences:
53.14 ms | 401 KiB | 5 Q