3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IPrinter { function print(PrintableValue $value): void; } class PrintableValue { public readonly mixed $value; public function __construct(mixed $value) { $this->value = $value; } public function __toString() { return json_encode($this->value); } } class ConsolePrinter implements IPrinter { function print(PrintableValue $value): void { echo $value; } } $printer = new ConsolePrinter; $value = new PrintableValue(['33']); $printer->print($value);

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.0120.00620.52
8.4.110.0120.00822.41
8.4.100.0120.01017.87
8.4.90.0090.01218.70
8.4.80.0160.00618.10
8.4.70.0110.01017.76
8.4.60.0080.00118.80
8.4.50.0110.00820.53
8.4.40.0100.01017.57
8.4.30.0040.01118.89
8.4.20.0060.00319.44
8.4.10.0150.00319.30
8.3.250.0110.00819.03
8.3.240.0150.00416.86
8.3.230.0110.00916.68
8.3.220.0060.00217.21
8.3.210.0050.00216.70
8.3.200.0040.00516.77
8.3.190.0040.00417.19
8.3.180.0050.00316.61
8.3.170.0040.01318.94
8.3.160.0040.00418.25
8.3.150.0000.00816.65
8.3.140.0000.00716.61
8.3.130.0100.01016.64
8.3.120.0080.00020.89
8.3.110.0090.00016.51
8.3.100.0030.00616.78
8.3.50.0120.00916.50
8.2.290.0140.00420.46
8.2.280.0140.00518.16
8.2.270.0000.01017.05
8.2.260.0040.00416.41
8.2.250.0060.00318.23
8.2.240.0140.00717.15
8.2.230.0040.00416.53
8.2.220.0030.00616.60
8.2.110.0160.00322.15
8.2.100.0220.00019.39
8.2.90.0320.00318.79
8.2.80.0210.00418.75
8.2.70.0130.00318.88
8.2.60.0110.00618.86
8.2.50.0200.00720.07
8.2.40.0240.00318.62
8.2.30.0140.01018.61
8.2.20.0090.00518.73
8.2.10.0050.00919.03
8.2.00.0110.00318.66
8.1.330.0140.00522.01
8.1.320.0100.00416.13
8.1.310.0000.00816.72
8.1.300.0030.01318.49
8.1.240.0100.00318.48
8.1.230.0140.00018.33
8.1.220.0100.00318.57
8.1.210.0080.00519.76
8.1.200.0130.00018.50
8.1.190.0140.00018.42
8.1.180.0110.00418.39
8.1.170.0090.00418.61
8.1.160.0090.00318.86
8.1.150.0140.00020.55
8.1.140.0090.00618.54
8.1.130.0130.00018.52
8.1.120.0080.00418.73
8.1.110.0080.00518.51
8.1.100.0060.00918.58
8.1.90.0060.00918.55
8.1.80.0070.00718.31
8.1.70.0080.00418.53
8.1.60.0160.00018.82
8.1.50.0130.00318.65
8.1.40.0110.00318.93
8.1.30.0060.00618.85
8.1.20.0060.01018.62
8.1.10.0070.00718.94
8.1.00.0100.00318.81
8.0.300.0120.00217.89
8.0.290.0050.00917.77
8.0.280.0130.00017.77
8.0.270.0070.00717.88
8.0.260.0150.00018.08
8.0.250.0070.00717.93
8.0.240.0170.00017.73
8.0.230.0150.00018.07
8.0.220.0100.00317.81
8.0.210.0140.00017.81
8.0.200.0220.00317.87
8.0.190.0140.00718.18
8.0.180.0040.01317.69
8.0.170.0220.00417.57
8.0.160.0230.00917.72
8.0.150.0220.01117.79
8.0.140.0180.00717.88
8.0.130.0140.00718.14
8.0.120.0260.00717.86
8.0.110.0200.00318.13
8.0.100.0110.01517.48
8.0.90.0250.00017.88
8.0.80.0200.00017.73
8.0.70.0200.01217.88
8.0.60.0060.00618.24
8.0.50.0170.01417.74
8.0.30.0160.01018.34
8.0.20.0170.00317.91
8.0.10.0070.00717.94

preferences:
28.15 ms | 403 KiB | 5 Q