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; throw new ErrorException('!!!'); } ); // 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.0080.01218.46
8.3.50.0070.00718.27
8.3.40.0150.00018.97
8.3.30.0150.00018.63
8.3.20.0030.00519.16
8.3.10.0040.00421.71
8.3.00.0050.00320.63
8.2.180.0110.00718.29
8.2.170.0150.00322.96
8.2.160.0110.00420.99
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00019.83
8.2.120.0070.00026.35
8.2.110.0070.01019.19
8.2.100.0040.00817.91
8.2.90.0040.00417.75
8.2.80.0050.00317.97
8.2.70.0000.00817.93
8.2.60.0090.00018.09
8.2.50.0030.00618.10
8.2.40.0000.00919.48
8.2.30.0040.00419.30
8.2.20.0000.00818.01
8.2.10.0000.01018.05
8.2.00.0110.00017.64
8.1.280.0000.01925.92
8.1.270.0060.00320.70
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.46
8.1.230.0100.00022.13
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.38
8.1.180.0070.00418.10
8.1.170.0000.00818.64
8.1.160.0040.00418.82
8.1.150.0040.00418.89
8.1.140.0000.00822.07
8.1.130.0000.00820.16
8.1.120.0070.00017.45
8.1.110.0070.00317.49
8.1.100.0000.00717.48
8.1.90.0050.00317.43
8.1.80.0050.00317.34
8.1.70.0100.00017.52
8.1.60.0090.00017.61
8.1.50.0000.00817.55
8.1.40.0000.00717.41
8.1.30.0040.00717.68
8.1.20.0000.00717.70
8.1.10.0000.01017.50
8.1.00.0050.00317.44
8.0.300.0030.00518.77
8.0.290.0030.00718.25
8.0.280.0000.00919.80
8.0.270.0000.00918.65
8.0.260.0040.00419.82
8.0.250.0060.00318.42
8.0.240.0040.00418.45
8.0.230.0050.00318.46
8.0.220.0000.00818.27
8.0.210.0040.00418.34
8.0.200.0080.00018.45
8.0.190.0030.00618.45
8.0.180.0000.00918.51
8.0.170.0060.00318.44
8.0.160.0000.00818.46
8.0.150.0060.00318.40
8.0.140.0080.00018.36
8.0.130.0040.00814.79
8.0.120.0090.00018.38
8.0.110.0060.00318.27
8.0.100.0000.00918.32
8.0.90.0000.00818.47
8.0.80.0060.01718.41
8.0.70.0050.00518.47
8.0.60.0030.00618.35
8.0.50.0030.00718.49
8.0.30.0130.00818.65
8.0.20.0070.01618.64
8.0.10.0040.00418.53
8.0.00.0140.01318.12
7.4.330.0050.00015.55
7.4.320.0000.00718.00
7.4.300.0040.00418.08
7.4.290.0080.00017.92
7.4.280.0020.00817.91
7.4.270.0030.00618.00
7.4.260.0000.01018.00
7.4.250.0000.00817.95
7.4.240.0030.00617.98
7.4.230.0040.00417.96
7.4.220.0060.00318.07
7.4.210.0100.01018.07
7.4.200.0050.00317.78
7.4.160.0110.00917.98
7.4.140.0150.01017.99
7.4.130.0120.00918.04
7.4.120.0140.00918.04
7.4.110.0030.02017.97
7.4.100.0120.00817.96
7.4.90.0130.01017.83
7.4.80.0130.01219.39
7.4.70.0210.00418.13
7.4.60.0080.01218.12
7.4.50.0060.00917.86
7.4.40.0170.00818.02
7.4.00.0140.00716.44
7.3.330.0030.00314.86
7.3.320.0030.00314.66
7.3.310.0030.00717.80
7.3.300.0060.00317.80
7.3.290.0060.00317.75
7.3.280.0110.00917.86
7.3.260.0120.01118.07
7.3.240.0120.00917.95
7.3.230.0070.01517.91
7.3.210.0120.00817.71
7.3.200.0110.00917.95
7.3.190.0120.01017.84
7.3.180.0060.01318.13
7.3.170.0140.00717.87
7.3.160.0070.01818.12
7.3.120.0110.01116.23
7.3.110.0080.01316.10
7.3.100.0090.01316.46
7.3.90.0080.01016.25
7.3.80.0050.01116.08
7.3.70.0050.00816.45
7.3.60.0040.01116.21
7.3.50.0080.01016.22
7.3.40.0080.00516.21
7.3.30.0060.00816.25
7.3.20.0030.01016.58
7.3.10.0080.00516.63
7.3.00.0000.01316.73
7.2.330.0120.00917.98
7.2.320.0030.02418.22
7.2.310.0140.00618.20
7.2.300.0060.01618.23
7.2.290.0120.00918.20
7.2.250.0070.01416.63
7.2.240.0090.01016.58
7.2.230.0070.01416.39
7.2.220.0110.00716.49
7.2.210.0040.01416.60
7.2.200.0000.01616.43
7.2.190.0070.00716.31
7.2.180.0050.00816.41
7.2.170.0060.01016.30
7.2.160.0080.00816.43
7.2.150.0030.01416.87
7.2.140.0050.01116.85
7.2.130.0060.00916.94
7.2.120.0000.01116.95
7.2.110.0270.01016.75
7.2.100.0060.01116.72
7.2.90.0250.00516.66
7.2.80.0260.00716.74
7.2.70.0260.01116.82
7.2.60.0240.01116.69
7.2.50.0340.01116.74
7.2.40.0440.00816.81
7.2.30.0300.01216.73
7.2.20.0350.01216.79
7.2.10.0300.00516.87
7.2.00.0270.00716.82
7.1.330.0050.01615.68
7.1.320.0060.01215.70
7.1.310.0090.00515.91
7.1.300.0070.01115.83
7.1.290.0000.01315.88
7.1.280.0060.00815.78
7.1.270.0100.00815.82
7.1.260.0000.01215.64
7.1.250.0070.00715.81
7.1.240.0090.00915.48
7.1.230.0380.00515.57
7.1.220.0350.01015.52
7.1.210.0280.01315.51
7.1.200.0270.01315.43
7.1.190.0350.00915.56
7.1.180.0350.01015.60
7.1.170.0500.00815.64
7.1.160.0380.01215.50
7.1.150.0460.00715.68
7.1.140.0400.00715.50
7.1.130.0420.01315.62
7.1.120.0470.00315.63
7.1.110.0340.00715.43
7.1.100.0270.01515.66
7.1.90.0300.01415.62
7.1.80.0300.00615.74
7.1.70.0140.00715.42
7.1.60.0220.00924.45
7.1.50.0250.00924.65
7.1.40.0440.01424.62
7.1.30.0190.01124.64
7.1.20.0460.00724.57
7.1.10.0190.01215.53
7.1.00.0360.01415.63
7.0.330.0040.00815.28
7.0.320.0040.01215.36
7.0.310.0080.00915.58
7.0.300.0030.00915.54
7.0.290.0100.01015.43
7.0.280.0060.00615.22
7.0.270.0070.01615.34
7.0.260.0060.01015.39
7.0.250.0000.01615.58
7.0.240.0060.01215.58
7.0.230.0040.01215.57
7.0.220.0110.00815.39
7.0.210.0080.01515.62
7.0.200.0100.01015.31
7.0.190.0100.01315.54
7.0.180.0130.01315.37
7.0.170.0110.01115.32
7.0.160.0090.01215.27
7.0.150.0140.00915.26
7.0.140.0120.00915.36
7.0.130.0120.01515.45
7.0.120.0080.00815.27
7.0.110.0100.01715.52
7.0.100.0080.01115.35
7.0.90.0070.01415.50
7.0.80.0060.01215.42
7.0.70.0070.01315.49
7.0.60.0070.01015.41
7.0.50.0070.01015.54
7.0.40.0030.01713.45
7.0.30.0120.00813.25
7.0.20.0030.01013.52
7.0.10.0040.01813.48
7.0.00.0090.00613.11
5.6.400.0060.00614.36
5.6.390.0030.01014.49
5.6.380.0070.01014.36
5.6.370.0070.01014.27
5.6.360.0070.00714.20
5.6.350.0000.01314.25
5.6.340.0060.00314.43
5.6.330.0040.00814.42
5.6.320.0080.00814.31
5.6.310.0100.01314.52
5.6.300.0090.01214.43
5.6.290.0070.01514.59
5.6.280.0120.00614.20
5.6.270.0080.01214.20
5.6.260.0150.00414.33
5.6.250.0140.00514.53
5.6.240.0070.01014.52
5.6.230.0060.00914.48
5.6.220.0040.01314.66
5.6.210.0030.01314.26
5.6.200.0030.00914.49
5.6.190.0070.01014.66
5.6.180.0080.00814.56
5.6.170.0070.00714.31
5.6.160.0130.00314.49
5.6.150.0060.00314.49
5.6.140.0090.00314.45
5.6.130.0090.00014.48
5.6.120.0030.01014.53
5.6.110.0100.00714.23
5.6.100.0120.00614.31
5.6.90.0060.00614.41
5.6.80.0130.00314.45
5.6.70.0080.00314.43
5.6.60.0030.01014.41
5.6.50.0120.00014.29
5.6.40.0130.00314.10
5.6.30.0060.00914.45
5.6.20.0040.01514.09
5.6.10.0030.01414.21
5.6.00.0030.01614.43

preferences:
56.83 ms | 401 KiB | 5 Q