3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Using plain class\n"; class A {}; $a = new A(); $a->foo = 'bar'; echo "Extending from stdClass\n"; class B extends stdClass {}; $b = new B(); $b->foo = 'bar'; echo "Using PHP attribute\n"; #[\AllowDynamicProperties] class C {}; $c = new C(); $c->foo = 'bar';

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.4.120.0110.00420.76
8.4.110.0070.00522.70
8.4.100.0110.01018.76
8.4.90.0110.01018.63
8.4.80.0050.00418.85
8.4.70.0130.00818.10
8.4.60.0130.00819.15
8.4.50.0070.00318.73
8.4.40.0130.00718.05
8.4.30.0080.00018.71
8.4.20.0070.01417.72
8.4.10.0060.00324.06
8.3.250.0120.00819.07
8.3.240.0100.00420.67
8.3.230.0130.00616.64
8.3.220.0110.01018.78
8.3.210.0040.00316.87
8.3.200.0090.01016.76
8.3.190.0130.00617.30
8.3.180.0120.00717.07
8.3.170.0120.00618.69
8.3.160.0090.00917.19
8.3.150.0050.00317.09
8.3.140.0150.00316.98
8.3.130.0000.01518.61
8.3.120.0040.00720.66
8.3.110.0080.00820.94
8.3.100.0090.00616.84
8.3.90.0070.00426.77
8.3.80.0000.01016.75
8.3.70.0140.00716.63
8.3.60.0220.00316.32
8.3.50.0090.00620.25
8.3.40.0070.00720.30
8.3.30.0070.00718.77
8.3.20.0080.00024.18
8.3.10.0030.00524.66
8.3.00.0040.00426.16
8.2.290.0080.01020.47
8.2.280.0110.01018.50
8.2.270.0120.00617.41
8.2.260.0040.01116.77
8.2.250.0120.00316.89
8.2.240.0110.00716.91
8.2.230.0070.00322.58
8.2.220.0030.00624.06
8.2.210.0110.00726.77
8.2.200.0000.01016.63
8.2.190.0160.00316.58
8.2.180.0140.00325.92
8.2.170.0120.00318.94
8.2.160.0060.00922.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00020.78
8.2.110.0030.00620.54
8.2.100.0060.00620.53
8.1.330.0140.00522.02
8.1.320.0100.01015.87
8.1.310.0000.01818.22
8.1.300.0030.00618.74
8.1.290.0030.00618.88
8.1.280.0050.01025.92
8.1.270.0030.00624.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00518.48
8.1.230.0100.00018.63

preferences:
29.33 ms | 403 KiB | 5 Q