3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { public function __construct(int $integer) { $this->integer = $integer; } } try { $foo = new Foo('1'); } catch (TypeError $e) { } finally { assert(isset($e), 'TypeError was thrown'); assert(!isset($foo), '$foo is unset'); } $foo = (new ReflectionClass(Foo::class))->newInstance('1'); var_dump($foo);

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.5.10.0100.00816.78
8.5.00.0080.01320.29
8.4.160.0130.00823.81
8.4.150.0030.00014.05
8.4.140.0160.00717.89
8.4.130.0060.00618.71
8.4.120.0130.00724.03
8.4.110.0120.00822.76
8.4.100.0050.00717.80
8.4.90.0130.00720.71
8.4.80.0120.00917.90
8.4.70.0090.00717.94
8.4.60.0100.00619.08
8.4.50.0140.00817.88
8.4.40.0040.00719.52
8.4.30.0000.00820.54
8.4.20.0130.00320.70
8.4.10.0030.00619.71
8.3.280.0140.00618.39
8.3.270.0150.00516.67
8.3.260.0110.01016.98
8.3.250.0110.00719.04
8.3.240.0100.00616.62
8.3.230.0050.00417.01
8.3.220.0130.00617.29
8.3.210.0070.01118.57
8.3.200.0130.00616.45
8.3.190.0070.01216.72
8.3.180.0130.00618.71
8.3.170.0120.00616.75
8.3.160.0160.00316.67
8.3.150.0090.00920.77
8.3.140.0090.00916.84
8.3.130.0060.00316.66
8.3.120.0070.00718.95
8.3.110.0030.00720.94
8.3.100.0150.00424.06
8.3.90.0140.00426.77
8.3.80.0040.00416.88
8.3.70.0120.00316.88
8.3.60.0130.00716.86
8.3.50.0070.01118.40
8.3.40.0140.00718.74
8.3.30.0060.01018.97
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0120.00720.49
8.2.280.0110.00918.63
8.2.270.0090.00017.36
8.2.260.0110.00818.68
8.2.250.0080.00018.53
8.2.240.0090.00019.05
8.2.230.0030.00722.58
8.2.220.0050.00337.54
8.2.210.0140.00026.77
8.2.200.0080.00316.75
8.2.190.0120.00616.63
8.2.180.0120.00625.92
8.2.170.0060.00919.08
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00019.77
8.2.110.0060.00321.14
8.2.100.0090.00317.78
8.2.90.0050.00319.25
8.2.80.0050.00317.97
8.2.70.0090.00017.75
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0000.00718.16
8.2.30.0040.00417.96
8.2.20.0070.00017.98
8.2.10.0040.00419.13
8.2.00.0000.00719.31
8.1.330.0100.00921.94
8.1.320.0080.00716.14
8.1.310.0060.00918.46
8.1.300.0000.00918.14
8.1.290.0040.00418.88
8.1.280.0120.00325.92
8.1.270.0060.01022.18
8.1.260.0060.00326.35
8.1.250.0090.00028.09
8.1.240.0030.00621.43
8.1.230.0070.00419.01
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0000.00817.23
8.1.180.0040.00718.10
8.1.170.0040.00418.70
8.1.160.0040.00418.95
8.1.150.0080.00020.30
8.1.140.0000.00718.90
8.1.130.0000.00820.15
8.1.120.0050.00317.50
8.1.110.0070.00017.36
8.1.100.0000.00717.36
8.1.90.0070.00017.48
8.1.80.0030.00617.34
8.1.70.0070.00017.52
8.1.60.0000.00717.58
8.1.50.0000.00917.41
8.1.40.0060.00617.51
8.1.30.0000.00817.64
8.1.20.0030.00617.63
8.1.10.0000.00817.46
8.1.00.0040.00417.50
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0070.00018.46
8.0.270.0050.00218.09
8.0.260.0050.00318.64
8.0.250.0030.00617.03
8.0.240.0040.00417.01
8.0.230.0070.00017.07
8.0.220.0000.00717.02
8.0.210.0030.00317.00
8.0.200.0030.00316.92
8.0.190.0060.00317.02
8.0.180.0000.00716.98
8.0.170.0060.00316.95
8.0.160.0070.00017.01
8.0.150.0080.00017.02
8.0.140.0060.00316.95
8.0.130.0030.00313.44
8.0.120.0070.00016.84
8.0.110.0040.00416.86
8.0.100.0050.00316.78
8.0.90.0000.00716.79
8.0.80.0050.00316.76
8.0.70.0000.00716.93
8.0.60.0070.00016.89
8.0.50.0040.00417.03
8.0.30.0000.00816.84
8.0.20.0080.00017.04
8.0.10.0050.00317.01
8.0.00.0070.00017.15
7.4.330.0030.00315.55
7.4.320.0000.00716.60
7.4.300.0030.00316.43
7.4.290.0000.00816.33
7.4.280.0050.00316.51
7.4.270.0040.00316.66
7.4.260.0050.00013.18
7.4.250.0070.00016.63
7.4.240.0070.00016.66
7.4.230.0000.00716.63
7.4.220.0030.00316.45
7.4.210.0000.00816.56
7.4.200.0070.00016.68
7.4.190.0030.00316.76
7.4.180.0070.00016.31
7.4.160.0000.00716.65
7.4.150.0030.00316.61
7.4.140.0030.00316.57
7.4.130.0070.00016.35
7.4.120.0030.00316.26
7.4.110.0000.00716.21
7.4.100.0030.00316.61
7.4.90.0000.00716.55
7.4.80.0030.00316.37
7.4.70.0030.00316.23
7.4.60.0050.00316.56
7.4.50.0030.00316.21
7.4.40.0030.00316.27
7.4.30.0070.00016.36
7.4.20.0030.00316.49
7.4.10.0030.00316.35
7.4.00.0030.00316.40
7.3.330.0030.00316.21
7.3.320.0050.00013.23
7.3.310.0030.00316.42
7.3.300.0000.00616.41
7.3.290.0070.00016.31
7.3.280.0040.00416.29
7.3.270.0070.00016.36
7.3.260.0040.00416.36
7.3.250.0020.00516.26
7.3.240.0030.00316.45
7.3.230.0030.00316.20
7.3.220.0030.00316.34
7.3.210.0040.00416.25
7.3.200.0050.00316.20
7.3.190.0000.00816.36
7.3.180.0040.00416.31
7.3.170.0000.00716.17
7.3.160.0030.00316.26
7.3.150.0060.00016.25
7.3.140.0030.00316.13
7.3.130.0040.00416.27
7.3.120.0000.00716.27
7.3.110.0070.00016.07
7.3.100.0000.00816.27
7.3.90.0030.00516.52
7.3.80.0050.00316.31
7.3.70.0000.00716.24
7.3.60.0030.00316.34
7.3.50.0040.00416.30
7.3.40.0040.00416.50
7.3.30.0000.00716.39
7.3.20.0070.00018.30
7.3.10.0000.00718.05
7.3.00.0040.00418.16

preferences:
39.67 ms | 403 KiB | 5 Q