3v4l.org

run code in 500+ PHP versions simultaneously
<?php class XABC { function foo() { // static does not apply to self $f = static function () : self { // __CLASS__ is preserved in the closure echo __CLASS__.PHP_EOL; return new self(); }; return $f; } } var_dump((new xabc)->foo()());

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.60.0100.00716.69
8.5.50.0110.00518.47
8.5.30.0120.00619.79
8.5.20.0090.01020.21
8.5.10.0090.00716.80
8.5.00.0090.01219.90
8.4.210.0090.01019.59
8.4.180.0120.01019.69
8.4.170.0130.00923.91
8.4.160.0080.01323.83
8.4.150.0060.00716.84
8.4.140.0110.01117.57
8.4.130.0110.00917.41
8.4.120.0070.00324.00
8.4.110.0090.00922.51
8.4.100.0120.00817.73
8.4.90.0130.00817.65
8.4.80.0040.00418.02
8.4.70.0070.00217.83
8.4.60.0370.00917.78
8.4.50.0340.01217.78
8.4.40.0370.01217.64
8.4.30.0400.00517.46
8.4.20.0390.01017.50
8.4.10.0400.00917.30
8.3.300.0130.00821.13
8.3.290.0110.00920.76
8.3.280.0150.00518.32
8.3.270.0110.00816.64
8.3.260.0130.00616.29
8.3.250.0060.00218.79
8.3.240.0090.00617.32
8.3.230.0100.00916.64
8.3.220.0100.01016.38
8.3.210.0130.00716.55
8.3.200.0340.01116.32
8.3.190.0290.00516.69
8.3.180.0340.01016.15
8.3.170.0420.00816.23
8.3.160.0370.00816.35
8.3.150.0450.00616.74
8.3.140.0390.00816.46
8.3.130.0350.00916.58
8.3.120.0320.00916.42
8.3.110.0360.00816.42
8.3.100.0390.00616.39
8.3.90.0290.00616.40
8.3.80.0160.00616.58
8.3.70.0320.00616.16
8.3.60.0310.00916.37
8.3.50.0400.00816.40
8.3.40.0330.01317.43
8.3.30.0340.00817.58
8.3.20.0350.00717.43
8.3.10.0310.00817.29
8.3.00.0190.00817.45
8.2.300.0150.00618.89
8.2.290.0090.01020.35
8.2.280.0280.01116.61
8.2.270.0280.01116.34
8.2.260.0330.00916.76
8.2.250.0290.00716.56
8.2.240.0310.00616.98
8.2.230.0290.00616.35
8.2.220.0340.00616.25
8.2.210.0270.01216.38
8.2.200.0340.00916.57
8.2.190.0320.00916.32
8.2.180.0330.00616.48
8.2.170.0360.00717.55
8.2.160.0350.01017.78
8.2.150.0320.01317.40
8.2.140.0350.00917.51
8.2.130.0300.01217.31
8.2.120.0380.00717.46
8.2.110.0310.01117.58
8.2.100.0320.00617.52
8.2.90.0370.00917.30
8.2.80.0340.00917.48
8.2.70.0310.00717.46
8.2.60.0370.00617.59
8.2.50.0390.00417.50
8.2.40.0340.00717.54
8.2.30.0300.01017.51
8.2.20.0330.00717.39
8.2.10.0310.00717.61
8.2.00.0310.00717.51
8.1.340.0100.01019.66

preferences:
66.99 ms | 847 KiB | 5 Q