3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar; class A { } class B { public function __construct($type) { $fullType = 'Foo\\Bar\\' . $type; echo "try to create $fullType\n"; new $fullType; echo "$fullType created\n"; $fullType = $type::class; echo "try to create $type::class ($fullType)\n"; new $fullType; echo "$type::class ($fullType) created\n"; echo "try to create $type\n"; new $type; echo "$type created\n"; } } new A; new B('A');

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.0100.01016.50
8.3.50.0120.00621.98
8.3.40.0090.00618.84
8.3.30.0070.00719.22
8.3.20.0070.00020.34
8.3.10.0000.00823.66
8.3.00.0080.00020.95
8.2.180.0070.01118.41
8.2.170.0120.00922.96
8.2.160.0030.01020.58
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0090.00626.16
8.2.120.0050.00319.24
8.2.110.0030.00622.27
8.2.100.0090.00018.94
8.1.280.0070.01425.92
8.1.270.0040.00423.77
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00618.53
8.1.230.0060.00318.64
5.4.240.0190.07112.40
5.4.230.0190.06012.39
5.4.220.0150.04612.39
5.4.210.0130.04512.39
5.4.200.0120.04912.39
5.4.190.0150.04512.39
5.4.180.0150.05112.39
5.4.170.0130.05012.40
5.4.160.0230.07112.39
5.4.150.0140.04612.38
5.4.140.0110.04912.08
5.4.130.0190.05712.05
5.4.120.0170.04912.02
5.4.110.0120.04812.02
5.4.100.0100.05012.02
5.4.90.0150.04612.02
5.4.80.0120.05312.02
5.4.70.0130.04512.02
5.4.60.0120.04912.01
5.4.50.0130.05212.02
5.4.40.0160.04612.00
5.4.30.0150.05112.00
5.4.20.0140.04912.00
5.4.10.0310.06412.00
5.4.00.0150.04911.49
5.3.280.0160.05112.71
5.3.270.0160.05612.72
5.3.260.0180.05012.72
5.3.250.0300.06812.72
5.3.240.0120.05212.72
5.3.230.0100.04812.71
5.3.220.0140.05312.68
5.3.210.0190.05712.68
5.3.200.0190.04712.68
5.3.190.0130.05212.68
5.3.180.0190.04512.68
5.3.170.0200.06012.67
5.3.160.0230.04612.67
5.3.150.0140.05212.67
5.3.140.0170.04612.66
5.3.130.0180.05012.66
5.3.120.0130.05312.66
5.3.110.0130.05212.66
5.3.100.0150.06012.12
5.3.90.0140.04712.10
5.3.80.0180.06112.08
5.3.70.0120.04712.08
5.3.60.0130.05212.07
5.3.50.0120.05012.01
5.3.40.0200.05312.01
5.3.30.0120.04911.97
5.3.20.0130.05211.75
5.3.10.0190.04311.72
5.3.00.0120.05011.71

preferences:
28.56 ms | 401 KiB | 5 Q