3v4l.org

run code in 300+ PHP versions simultaneously
<?php // overriding an untyped parent constant with a typed one class A { public const VALUE = 42; // untyped } class B extends A { public const float VALUE = 42.5; // narrowing to `float` } echo "Parent type: " . gettype(A::VALUE) . "\n"; echo "Child value: " . B::VALUE . "\n";

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.140.0090.01117.69
8.4.130.0060.00617.57
8.4.120.0150.00520.73
8.4.110.0130.00818.70
8.4.100.0140.00518.51
8.4.90.0090.00320.44
8.4.80.0130.00817.57
8.4.70.0130.00617.46
8.4.60.0180.00417.63
8.4.50.0160.00617.77
8.4.40.0190.00517.46
8.4.30.0170.00617.63
8.4.20.0190.00517.37
8.4.10.0180.00517.65
8.3.260.0140.00616.61
8.3.250.0140.00418.91
8.3.240.0070.01216.50
8.3.230.0160.00516.63
8.3.220.0160.00416.37
8.3.210.0150.00716.50
8.3.200.0170.00416.62
8.3.190.0160.00516.40
8.3.180.0160.00516.46
8.3.170.0180.00516.63
8.3.160.0200.00316.34
8.3.150.0170.00516.46
8.3.140.0170.00516.36
8.3.130.0150.00616.57
8.3.120.0150.00616.63
8.3.110.0180.00316.48
8.3.100.0180.00516.48
8.3.90.0180.00416.45
8.3.80.0230.00316.54
8.3.70.0180.00616.48
8.3.60.0200.00416.52
8.3.50.0210.00516.54
8.3.40.0200.00517.35
8.3.30.0170.00417.55
8.3.20.0240.00517.46
8.3.10.0230.00717.28
8.3.00.0210.00617.48
8.2.290.0210.00716.37
8.2.280.0210.00816.63
8.2.270.0260.00716.48
8.2.260.0230.00716.19
8.2.250.0230.00916.39
8.2.240.0180.00616.37
8.2.230.0120.00616.41
8.2.220.0220.00716.56
8.2.210.0170.00516.55
8.2.200.0220.00516.74
8.2.190.0240.00616.46
8.2.180.0220.00616.47
8.2.170.0150.00517.47
8.2.160.0220.00417.32
8.2.150.0140.00617.38
8.2.140.0160.00517.16
8.2.130.0180.00517.34
8.2.120.0150.00617.41
8.2.110.0160.00317.21
8.2.100.0190.00217.24
8.2.90.0150.00617.51
8.2.80.0140.00517.48
8.2.70.0140.00617.50
8.2.60.0160.00317.33
8.2.50.0150.00417.38
8.2.40.0150.00617.19
8.2.30.0170.00317.36
8.2.20.0150.00517.16
8.2.10.0140.00517.25
8.2.00.0130.00617.21

preferences:
39.36 ms | 403 KiB | 5 Q