3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { readonly string $x; public function initFromA() { $this->x = 'a'; } } class B extends A { readonly string $x; public function initFromB() { $this->x = 'b'; } } $c = new B; $c->initFromB(); var_dump($c->x); $c->initFromA(); // Error: alredy initialized

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.80.0050.00317.10
8.5.70.0030.00616.97
8.5.60.0090.00818.75
8.5.50.0110.00616.78
8.5.30.0110.00719.54
8.5.20.0080.01120.09
8.5.10.0110.00716.86
8.5.00.0130.00920.02
8.4.230.0120.01119.72
8.4.220.0070.00319.77
8.4.210.0130.00921.46
8.4.180.0120.01019.77
8.4.170.0120.00923.88
8.4.160.0080.01323.82
8.4.150.0080.00516.97
8.4.140.0160.00718.10
8.4.130.0060.00419.00
8.4.120.0120.00823.76
8.4.110.0140.00822.32
8.4.100.0070.01118.07
8.4.90.0110.00920.71
8.4.80.0110.00718.18
8.4.70.0150.00618.18
8.4.60.0120.00918.54
8.4.50.0120.00718.85
8.4.40.0130.00718.03
8.4.30.0110.01118.69
8.4.20.0090.00019.97
8.4.10.0080.00019.79
8.3.320.0120.00818.41
8.3.310.0120.00718.38
8.3.300.0130.00720.75
8.3.290.0130.00820.79
8.3.280.0120.01118.50
8.3.270.0140.00716.60
8.3.260.0140.00516.47
8.3.250.0110.00718.95
8.3.240.0030.00517.25
8.3.230.0040.00416.74
8.3.220.0030.00516.79
8.3.210.0070.00616.58
8.3.200.0150.00516.76
8.3.190.0100.00916.99
8.3.180.0130.00718.80
8.3.170.0090.00019.00
8.3.160.0090.00917.00
8.3.150.0090.00917.12
8.3.140.0030.00520.93
8.3.130.0080.00018.47
8.3.120.0060.00318.95
8.3.110.0100.01018.54
8.3.100.0100.01018.31
8.3.70.0180.00818.26
8.3.60.0330.00817.97
8.3.50.0100.00718.30
8.3.40.0280.00317.97
8.3.30.0340.00217.97
8.3.20.0240.00717.97
8.3.10.0250.01117.97
8.3.00.0340.01117.97
8.2.320.0130.00618.16
8.2.310.0070.01218.25
8.2.300.0140.00718.34
8.2.290.0130.00620.32
8.2.280.0130.00618.55
8.2.270.0140.00417.06
8.2.260.0160.00318.45
8.2.250.0040.00416.75
8.2.240.0070.00317.06
8.2.230.0040.00418.35
8.2.220.0100.00016.86
8.2.190.0370.00817.97
8.2.180.0280.00917.97
8.2.170.0300.00817.97
8.2.160.0260.00517.97
8.2.150.0200.01417.97
8.2.140.0260.00617.97
8.2.130.0220.00917.97
8.2.120.0230.00417.97
8.2.110.0260.00417.97
8.2.100.0230.00317.97
8.2.90.0240.00017.97
8.2.80.0240.00517.97
8.2.70.0340.00417.97
8.2.60.0340.00717.97
8.2.50.0300.00917.97
8.2.40.0270.01117.97
8.2.30.0330.00517.97
8.2.20.0270.00817.97
8.2.10.0300.00917.97
8.2.00.0370.00317.97
8.1.340.0090.00921.40
8.1.330.0090.01022.12
8.1.320.0130.00518.25
8.1.310.0060.00316.90
8.1.300.0070.01016.10
8.1.280.0340.01117.97
8.1.270.0300.01017.97
8.1.260.0250.00617.97
8.1.250.0320.00417.97
8.1.240.0290.00517.97
8.1.230.0500.00117.97
8.1.220.0330.01017.97
8.1.210.0340.00617.97
8.1.200.0330.00717.97
8.1.190.0340.00517.97
8.1.180.0360.00517.97
8.1.170.0290.00817.97
8.1.160.0240.00817.97
8.1.150.0210.01017.97
8.1.140.0300.00217.97
8.1.130.0310.00618.43
8.1.120.0230.00417.97
8.1.110.0190.00517.97
8.1.100.0200.00417.97
8.1.90.0190.00217.97
8.1.80.0130.00717.97
8.1.70.0170.00317.97
8.1.60.0210.00417.97
8.1.50.0240.00317.97
8.1.40.0180.00617.97
8.1.30.0230.00517.97
8.1.20.0270.00417.97
8.1.10.0300.00717.97
8.1.00.0260.00817.97

preferences:
66.05 ms | 1023 KiB | 5 Q