3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); echo PHP_EOL; set_exception_handler( function () { echo 'set_exception_handler' . PHP_EOL; die(); } ); set_error_handler( function () { echo 'set_error_handler' . PHP_EOL; die(); } ); register_shutdown_function( function () { echo 'register_shutdown_function' . PHP_EOL; if (null === $error = error_get_last()) { return; } echo 'register_shutdown_function WITH exception' . PHP_EOL; } ); // set_exception_handler //throw new \Error('qq'); // set_exception_handler //throw new \RuntimeException('qq'); // set_error_handler //$a=b; // register_shutdown_function WITH exception ini_set('memory_limit', '1KB'); $a = []; for ($i = 1; $i <= 10000000; $i++) { $a[] = new stdClass(); }

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.0180.00318.43
8.3.50.0140.00718.32
8.3.40.0070.00718.84
8.3.30.0040.01118.84
8.3.20.0060.00319.29
8.3.10.0080.00021.98
8.3.00.0060.00320.58
8.2.180.0070.01116.50
8.2.170.0060.00922.96
8.2.160.0070.00720.84
8.2.150.0080.00024.18
8.2.140.0000.01524.66
8.2.130.0040.00419.77
8.2.120.0040.00426.35
8.2.110.0050.00519.27
8.2.100.0040.00817.91
8.2.90.0000.00817.50
8.2.80.0000.00817.97
8.2.70.0050.00317.93
8.2.60.0040.00418.16
8.2.50.0080.00018.10
8.2.40.0040.00419.47
8.2.30.0040.00419.26
8.2.20.0040.00418.07
8.2.10.0030.00517.95
8.2.00.0000.00817.61
8.1.280.0110.00425.92
8.1.270.0040.00418.83
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0070.00322.52
8.1.230.0040.00822.17
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0030.00717.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.52
8.1.160.0040.00418.95
8.1.150.0040.00418.95
8.1.140.0000.00722.06
8.1.130.0030.00320.14
8.1.120.0000.00817.45
8.1.110.0030.00517.38
8.1.100.0060.00317.38
8.1.90.0070.00017.47
8.1.80.0050.00217.45
8.1.70.0060.00317.53
8.1.60.0070.00017.61
8.1.50.0090.00017.50
8.1.40.0000.00817.54
8.1.30.0080.00017.71
8.1.20.0080.00017.69
8.1.10.0060.00317.48
8.1.00.0030.00717.44
8.0.300.0040.00418.77
8.0.290.0090.00018.25
8.0.280.0000.00819.92
8.0.270.0040.00718.65
8.0.260.0000.00719.79
8.0.250.0000.00818.33
8.0.240.0040.00418.33
8.0.230.0000.00818.38
8.0.220.0000.00818.35
8.0.210.0060.00318.36
8.0.200.0040.00418.48
8.0.190.0040.00418.46
8.0.180.0030.00618.51
8.0.170.0070.00318.45
8.0.160.0060.00318.55
8.0.150.0000.00918.26
8.0.140.0000.00818.39
8.0.130.0050.00514.81
8.0.120.0040.00418.44
8.0.110.0040.00718.39
8.0.100.0060.00318.31
8.0.90.0030.00618.48
8.0.80.0110.01318.44
8.0.70.0040.00418.28
8.0.60.0040.00418.37
8.0.50.0030.00618.29
8.0.30.0120.01018.49
8.0.20.0150.01718.77
8.0.10.0000.00818.37
8.0.00.0170.00518.31
7.4.330.0060.00015.55
7.4.320.0000.00717.93
7.4.300.0060.00317.91
7.4.290.0060.00318.02
7.4.280.0060.00617.99
7.4.270.0060.00318.10
7.4.260.0000.00917.93
7.4.250.0000.00817.89
7.4.240.0000.00917.98
7.4.230.0050.00318.05
7.4.220.0060.00318.14
7.4.210.0170.00318.12
7.4.200.0000.00818.10
7.4.160.0090.01018.00
7.4.140.0110.01017.96
7.4.130.0160.00817.86
7.4.120.0110.00918.03
7.4.110.0100.01017.88
7.4.100.0030.01517.94
7.4.90.0040.01617.91
7.4.80.0100.01719.39
7.4.70.0110.00818.00
7.4.60.0100.01017.92
7.4.50.0000.01717.89
7.4.40.0130.01318.02
7.4.00.0060.01316.54
7.3.330.0060.00014.84
7.3.320.0000.00614.70
7.3.310.0060.00317.79
7.3.300.0040.00417.83
7.3.290.0000.00917.81
7.3.280.0090.00917.80
7.3.260.0110.01317.88
7.3.240.0110.01017.86
7.3.230.0030.01717.88
7.3.210.0060.01318.04
7.3.200.0150.00617.78
7.3.190.0060.01618.00
7.3.180.0120.00917.84
7.3.170.0150.00917.91
7.3.160.0080.01217.84
7.2.330.0160.00617.98
7.2.320.0170.01018.24
7.2.310.0200.00017.89
7.2.300.0130.00617.97
7.2.290.0100.01018.04
7.2.110.0220.00916.39
7.2.100.0230.00516.08
7.2.90.0220.01216.06
7.2.80.0190.01615.96
7.2.70.0280.00616.29
7.2.60.0300.00416.13
7.2.50.0270.01316.40
7.2.40.0190.01616.23
7.2.30.0180.01216.29
7.2.20.0310.01016.42
7.2.10.1210.00016.25
7.2.00.0230.00716.54
7.1.230.0250.00415.43
7.1.220.0270.00315.54
7.1.210.0400.00615.29
7.1.200.0270.00915.39
7.1.190.0210.01115.51
7.1.180.0240.00415.25
7.1.170.0290.01015.09
7.1.160.0250.00315.17
7.1.150.0130.01615.22
7.1.140.0200.01015.15
7.1.130.0310.00314.94
7.1.120.0410.00314.92
7.1.110.0220.01215.08
7.1.100.0270.00615.18
7.1.90.0200.01214.88
7.1.80.0250.00915.06
7.1.70.0420.00015.11
7.1.60.0430.01332.97
7.1.50.0550.01533.01
7.1.40.0510.01333.16
7.1.30.0460.00732.85
7.1.20.0460.02033.09
7.1.10.0330.01014.80
7.1.00.0360.00915.35
5.6.380.0070.00414.66

preferences:
34.33 ms | 400 KiB | 5 Q