3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $i = 1; $s = ''; $_type_enforcer = new class($i, $s) { public function __construct( public int &$i, public string &$s ) {} }; try { $i = ''; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } try { $s = 1; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } unset($_type_enforcer); try { $i = ''; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } try { $s = 1; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; }

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.4.120.0110.00920.32
8.4.110.0060.01318.94
8.4.100.0140.00317.80
8.4.90.0140.00819.65
8.4.80.0100.00918.11
8.4.70.0110.00918.03
8.4.60.0130.00817.80
8.4.50.0110.00717.85
8.4.40.0140.00318.12
8.4.30.0040.01520.42
8.4.20.0120.00918.74
8.4.10.0040.00420.52
8.3.250.0080.01118.86
8.3.240.0090.01116.60
8.3.230.0080.00716.87
8.3.220.0050.00317.33
8.3.210.0140.00418.66
8.3.200.0140.00616.74
8.3.190.0120.00816.60
8.3.180.0020.00618.41
8.3.170.0040.00416.55
8.3.160.0120.00618.79
8.3.150.0120.00317.32
8.3.140.0060.00319.07
8.3.130.0050.00318.73
8.3.120.0030.00618.93
8.3.110.0070.00420.94
8.3.100.0100.01016.74
8.3.90.0040.01426.77
8.3.80.0060.00319.36
8.3.70.0140.00716.63
8.3.60.0120.00618.58
8.3.50.0330.00323.74
8.3.40.0110.01118.95
8.3.30.0090.00618.82
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0080.01218.93
8.2.280.0070.00820.11
8.2.270.0110.00816.68
8.2.260.0140.00416.71
8.2.250.0000.00816.93
8.2.240.0030.00617.29
8.2.230.0040.00422.58
8.2.220.0000.00924.06
8.2.210.0140.00026.77
8.2.200.0000.00918.88
8.2.190.0140.00416.75
8.2.180.0100.01025.92
8.2.170.0120.00319.16
8.2.160.0030.01622.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.10
8.2.110.0060.00320.35
8.2.100.0000.01020.35
8.1.330.0100.00916.63
8.1.320.0150.00416.52
8.1.310.0170.00316.89
8.1.300.0070.00720.28
8.1.290.0060.00330.84
8.1.280.0120.00625.92
8.1.270.0030.00623.99
8.1.260.0030.00526.35
8.1.250.0050.00228.09
8.1.240.0000.01120.00
8.1.230.0040.00418.92
7.4.80.0210.00816.04
7.4.70.0150.01316.07
7.4.60.0170.01015.94
7.4.50.0170.01316.11
7.4.40.0170.01116.20
7.4.30.0160.01216.15
7.4.20.0170.01116.25
7.4.10.0200.00716.42
7.4.00.0130.00816.43
7.3.200.0130.01215.99
7.3.190.0160.01115.97
7.3.180.0210.00915.96
7.3.170.0160.01416.10
7.3.160.0210.00916.10
7.3.150.0180.01215.99
7.3.140.0210.00716.11
7.3.130.0190.01116.12
7.3.120.0170.01116.18
7.3.110.0180.01016.21
7.3.100.0150.01416.19
7.3.90.0190.01116.18
7.3.80.0230.00816.24
7.3.70.0250.01116.16
7.3.60.0200.01316.18
7.3.50.0240.01116.11
7.3.40.0200.00816.13
7.3.30.0260.00916.18
7.3.20.0380.01316.34
7.3.10.0200.01116.20
7.3.00.0170.01516.21
7.2.320.0190.00916.16
7.2.310.0090.01916.02
7.2.300.0150.01316.19
7.2.290.0130.01416.25
7.2.280.0170.00916.27
7.2.270.0170.00916.07
7.2.260.0130.01316.37
7.2.250.0150.01316.11
7.2.240.0190.00916.42
7.2.230.0220.00816.07
7.2.220.0200.01416.39
7.2.210.0190.01216.17
7.2.200.0210.01716.37
7.2.190.0200.01616.49
7.2.180.0200.01516.24
7.2.170.0130.01616.29
7.2.160.0160.01416.31
7.2.150.0240.00816.34
7.2.140.0180.01116.33
7.2.130.0230.01116.28
7.2.120.0220.00816.42
7.2.110.0200.01316.28
7.2.100.0310.01016.25
7.2.90.0200.01216.43
7.2.80.0160.01416.45
7.2.70.0190.01116.38
7.2.60.0180.01316.32
7.2.50.0140.01316.38
7.2.40.0120.01416.36
7.2.30.0160.01216.29
7.2.20.0180.00916.36
7.2.10.0160.01116.21
7.2.00.0250.01016.26

preferences:
27.41 ms | 403 KiB | 5 Q