3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A {} class B {} class C {} class Test { public function __construct( public A $foo, public B $bar, public ?C $baz = null ) { $this->baz = $baz ?? new C; } } $test = new Test(new A, new B); var_dump($test);

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.70.0020.00516.75
8.5.60.0090.00916.73
8.5.50.0060.00316.77
8.5.30.0100.00919.46
8.5.20.0080.01020.98
8.5.10.0100.00618.29
8.5.00.0130.00919.92
8.4.210.0110.01021.50
8.4.180.0120.01019.55
8.4.170.0130.00920.35
8.4.160.0140.00723.84
8.4.150.0080.00416.87
8.4.140.0100.01117.48
8.4.130.0090.01118.61
8.4.120.0100.01024.12
8.4.110.0120.00918.80
8.4.100.0100.01018.95
8.4.90.0070.01320.49
8.4.80.0080.01317.93
8.4.70.0090.01117.88
8.4.60.0130.00723.88
8.4.50.0100.01218.50
8.4.40.0170.00319.16
8.4.30.0040.00420.33
8.4.20.0090.00019.02
8.4.10.0080.00817.57
8.3.300.0120.00820.78
8.3.290.0120.00820.77
8.3.280.0100.01018.45
8.3.270.0090.01016.40
8.3.260.0060.00416.74
8.3.250.0110.00818.87
8.3.240.0070.01017.13
8.3.230.0080.01116.64
8.3.220.0120.00618.81
8.3.210.0100.00918.34
8.3.200.0030.00616.52
8.3.190.0050.00317.15
8.3.180.0050.00416.67
8.3.170.0120.00616.90
8.3.160.0160.00316.74
8.3.150.0180.00018.56
8.3.140.0060.01317.41
8.3.130.0000.00818.30
8.3.120.0070.01419.05
8.3.110.0090.00020.94
8.3.100.0130.00324.06
8.3.90.0090.00626.77
8.3.80.0090.00016.63
8.3.70.0130.00616.61
8.3.60.0090.01218.55
8.3.50.0070.00716.49
8.3.40.0040.01118.82
8.3.30.0110.00418.67
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.300.0130.00722.13
8.2.290.0100.00820.57
8.2.280.0130.00718.39
8.2.270.0130.00617.42
8.2.260.0120.00616.59
8.2.250.0060.00318.38
8.2.240.0000.00917.06
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0070.00726.77
8.2.200.0030.00616.38
8.2.190.0120.00916.63
8.2.180.0170.00325.92
8.2.170.0140.00718.90
8.2.160.0130.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.48
8.2.110.0040.00720.35
8.2.100.0040.00420.38
8.1.340.0140.00921.69
8.1.330.0110.00721.92
8.1.320.0140.00515.84
8.1.310.0030.00618.50
8.1.300.0060.00320.16
8.1.290.0000.01018.88
8.1.280.0200.00025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00719.05
8.1.230.0100.00020.32
8.0.30.0110.00616.83
8.0.20.0150.00416.99
8.0.10.0190.00016.94
8.0.00.0060.01616.98
7.4.160.0090.00616.54
7.4.150.0120.00616.29
7.4.140.0060.00916.41
7.4.130.0040.01116.24
7.4.120.0060.01216.38
7.4.110.0120.00916.20
7.4.100.0120.00616.48
7.4.90.0070.01416.20
7.4.80.0060.00616.35
7.4.70.0050.01516.25
7.4.60.0040.00116.30
7.4.50.0130.00716.21
7.4.40.0160.00316.02
7.4.30.0070.01416.27
7.4.20.0110.01116.21
7.4.10.0070.01416.24
7.4.00.0140.00616.33
7.3.270.0080.01216.27
7.3.260.0040.01016.14
7.3.250.0060.01516.14
7.3.240.0070.01416.14
7.3.230.0120.00916.15
7.3.220.0090.00616.27
7.3.210.0070.01116.02
7.3.200.0100.01116.05
7.3.190.0090.01316.00
7.3.180.0120.00816.13
7.3.170.0100.00916.06
7.3.160.0080.01116.11
7.3.150.0130.00716.12
7.3.140.0070.01316.14
7.3.130.0100.00316.16
7.3.120.0070.01116.13
7.3.110.0140.00516.03
7.3.100.0180.00315.99
7.3.90.0150.00516.42
7.3.80.0090.01216.02
7.3.70.0070.01316.16
7.3.60.0100.01016.25
7.3.50.0110.00916.19
7.3.40.0060.01016.21
7.3.30.0090.01516.17
7.3.20.0060.00916.23
7.3.10.0340.01416.26
7.3.00.0000.01516.16

preferences:
85.66 ms | 1080 KiB | 5 Q