3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() {} } function __new(string $class) { return (fn (...$args) => new $class(...$args))(...); } # $cb = Foo::__construct(...); # $cb = [new Foo, '__construct'](...); # $cb = __new(Foo::class)(...); $cb = __new(Foo::class); var_dump($cb());

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.30.0120.00820.82
8.5.20.0080.00821.46
8.5.10.0120.00618.58
8.5.00.0100.01119.93
8.4.180.0090.00823.71
8.4.170.0130.00822.00
8.4.160.0150.00823.91
8.4.150.0010.00014.05
8.4.140.0130.00917.64
8.4.130.0120.00717.95
8.4.120.0110.00820.33
8.4.110.0140.00322.32
8.4.100.0060.00318.91
8.4.90.0110.00919.01
8.4.80.0170.00320.68
8.4.70.0050.00318.04
8.4.60.0060.00319.08
8.4.50.0090.00818.82
8.4.40.0090.00917.89
8.4.30.0000.01620.52
8.4.20.0100.01020.61
8.4.10.0060.00319.54
8.3.300.0110.01020.55
8.3.290.0110.00720.72
8.3.280.0100.01318.32
8.3.270.0150.00616.80
8.3.260.0100.00816.70
8.3.250.0130.00519.05
8.3.240.0120.00721.02
8.3.230.0130.00616.44
8.3.220.0060.00119.07
8.3.210.0120.00616.83
8.3.200.0050.00416.48
8.3.190.0110.00817.04
8.3.180.0110.00717.22
8.3.170.0080.00018.95
8.3.160.0120.00616.86
8.3.150.0190.00017.24
8.3.140.0110.00716.46
8.3.130.0060.00316.56
8.3.120.0070.00020.86
8.3.110.0090.00022.58
8.3.100.0000.00922.58
8.3.50.0000.00722.58
8.2.300.0100.01218.08
8.2.290.0110.00820.39
8.2.280.0120.00818.16
8.2.270.0150.00419.11
8.2.260.0100.00716.45
8.2.250.0050.00318.32
8.2.240.0000.00818.85
8.2.230.0030.00622.58
8.2.220.0080.00022.58
8.1.340.0100.00917.60
8.1.330.0090.00921.91
8.1.320.0150.00516.21
8.1.310.0070.00016.70
8.1.300.0110.00718.13
8.1.00.0270.00417.49
8.0.130.0070.00416.82
8.0.120.0180.00516.89
8.0.110.0210.00216.80
8.0.100.0200.00416.83
8.0.90.0210.00416.72
8.0.80.0190.00616.87
8.0.70.0210.00716.79
8.0.60.0220.00516.79
8.0.50.0230.00616.81
8.0.30.0200.00316.72
8.0.20.0190.00216.89
8.0.10.0170.00416.82
8.0.00.0040.00716.92
7.4.270.0030.00516.46
7.4.260.0200.00716.42
7.4.250.0250.00216.38
7.4.240.0210.00616.48
7.4.230.0250.00316.36
7.4.220.0180.00616.36
7.4.210.0240.00316.37
7.4.200.0230.00516.36
7.4.190.0150.00716.35
7.4.180.0150.00716.40
7.4.160.0140.00816.38
7.4.150.0170.00516.22
7.4.140.0180.00416.22
7.4.130.0150.00616.12
7.4.120.0180.00416.23
7.4.110.0170.00516.30
7.4.100.0150.00716.37
7.4.90.0160.00516.20
7.4.80.0180.00516.20
7.4.70.0160.00616.26
7.4.60.0120.01016.24
7.4.50.0130.00816.06
7.4.40.0200.00416.14
7.4.30.0210.00016.16
7.4.20.0150.00616.13
7.4.10.0180.00416.24
7.4.00.0210.00516.23
7.3.330.0110.00716.20
7.3.320.0130.00416.20
7.3.310.0190.00516.20
7.3.300.0090.00516.23
7.3.290.0170.00616.03
7.3.280.0150.00716.15
7.3.270.0110.00015.98
7.3.260.0180.00516.10
7.3.250.0170.00616.19
7.3.240.0060.00516.10
7.3.230.0020.00916.20
7.3.220.0080.00415.61
7.3.210.0090.00516.01
7.3.200.0070.00515.74
7.3.190.0050.00616.00
7.3.180.0150.00516.18
7.3.170.0120.00516.11
7.3.160.0140.00416.04
7.3.150.0110.00616.08
7.3.140.0090.00716.05
7.3.130.0110.00616.15

preferences:
53.4 ms | 977 KiB | 5 Q