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"; echo "try to create $type::class\n"; new $type::class; echo "$type::class 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)
5.4.240.0160.06912.38
5.4.230.0190.07112.38
5.4.220.0140.04112.38
5.4.210.0150.04212.38
5.4.200.0210.06712.38
5.4.190.0110.04512.37
5.4.180.0280.05812.37
5.4.170.0110.04312.38
5.4.160.0110.04112.37
5.4.150.0180.06412.37
5.4.140.0190.06512.06
5.4.130.0230.06512.04
5.4.120.0180.06812.01
5.4.110.0140.05412.00
5.4.100.0190.07012.00
5.4.90.0170.04312.00
5.4.80.0210.06512.00
5.4.70.0230.06012.00
5.4.60.0250.05912.00
5.4.50.0130.03812.00
5.4.40.0240.06811.99
5.4.30.0200.06411.98
5.4.20.0240.05911.98
5.4.10.0240.07711.98
5.4.00.0110.04111.48
5.3.280.0180.06812.71
5.3.270.0230.06512.72
5.3.260.0220.06712.72
5.3.250.0110.04612.72
5.3.240.0140.04912.72
5.3.230.0300.07312.71
5.3.220.0140.04112.68
5.3.210.0210.07212.68
5.3.200.0180.06912.68
5.3.190.0160.03912.68
5.3.180.0290.09912.68
5.3.170.0230.05212.67
5.3.160.0150.04712.68
5.3.150.0180.06512.67
5.3.140.0110.04212.66
5.3.130.0230.06212.65
5.3.120.0120.04912.66
5.3.110.0110.04512.66
5.3.100.0100.04212.12
5.3.90.0200.06412.08
5.3.80.0150.03812.08
5.3.70.0230.05812.07
5.3.60.0090.04612.06
5.3.50.0190.05212.00
5.3.40.0140.03912.00
5.3.30.0130.03811.95
5.3.20.0100.04511.73
5.3.10.0090.04211.70
5.3.00.0210.06411.68
5.2.170.0100.0319.14
5.2.160.0110.0319.15
5.2.150.0100.0359.14
5.2.140.0100.0369.14
5.2.130.0100.0329.10
5.2.120.0130.0279.10
5.2.110.0080.0369.11
5.2.100.0090.0329.11
5.2.90.0120.0299.10
5.2.80.0110.0329.09
5.2.70.0140.0469.09
5.2.60.0100.0359.05
5.2.50.0110.0319.03
5.2.40.0080.0359.00
5.2.30.0070.0358.97
5.2.20.0100.0328.96
5.2.10.0100.0318.88
5.2.00.0100.0328.74
5.1.60.0110.0538.03
5.1.50.0060.0308.03
5.1.40.0100.0278.02
5.1.30.0100.0278.36
5.1.20.0080.0298.39
5.1.10.0100.0268.11
5.1.00.0070.0298.11
5.0.50.0070.0216.58
5.0.40.0050.0216.44
5.0.30.0070.0346.26
5.0.20.0090.0206.23
5.0.10.0070.0206.21
5.0.00.0100.0596.20
4.4.90.0060.0164.78
4.4.80.0040.0184.75
4.4.70.0050.0164.75
4.4.60.0040.0184.75
4.4.50.0050.0164.77
4.4.40.0050.0264.71
4.4.30.0050.0164.76
4.4.20.0070.0164.84
4.4.10.0070.0154.85
4.4.00.0050.0264.76
4.3.110.0050.0184.67
4.3.100.0070.0164.66
4.3.90.0050.0164.63
4.3.80.0040.0284.58
4.3.70.0060.0164.63
4.3.60.0060.0164.63
4.3.50.0040.0184.63
4.3.40.0040.0274.54
4.3.30.0030.0193.28
4.3.20.0040.0163.25
4.3.10.0040.0153.22
4.3.00.0070.0276.59

preferences:
143.27 ms | 1394 KiB | 7 Q