3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public ?string $prop = null; public function __construct(?string $prop = null) { $this->prop = $prop; } } class Bar extends Foo { public function __construct( public ?string $bar = null, ) {} } // Echoes nothing, but it works as expected. echo (new Bar())->prop;

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.0130.00516.86
8.5.70.0090.00417.04
8.5.60.0090.00818.42
8.5.50.0080.00918.57
8.5.30.0090.00721.34
8.5.20.0060.00417.78
8.5.10.0050.00316.73
8.5.00.0140.01019.71
8.4.230.0080.01019.41
8.4.220.0090.00619.39
8.4.210.0130.00821.41
8.4.180.0110.01019.70
8.4.170.0120.01024.00
8.4.160.0150.00723.75
8.4.150.0080.00416.83
8.4.140.0060.01517.54
8.4.130.0070.00418.03
8.4.120.0110.00924.16
8.4.110.0120.00720.54
8.4.100.0140.00620.79
8.4.90.0130.00820.78
8.4.80.0120.00818.59
8.4.70.0090.01117.70
8.4.60.0140.00617.95
8.4.50.0050.00617.65
8.4.40.0060.01517.72
8.4.30.0100.01020.51
8.4.20.0120.00317.89
8.4.10.0040.00419.37
8.3.320.0060.00418.40
8.3.310.0110.00918.48
8.3.300.0140.00620.76
8.3.290.0090.01222.59
8.3.280.0140.00618.35
8.3.270.0130.00616.69
8.3.260.0080.01016.61
8.3.250.0120.00319.00
8.3.240.0050.00317.17
8.3.230.0150.00516.36
8.3.220.0080.01118.83
8.3.210.0070.01018.54
8.3.200.0080.01316.51
8.3.190.0110.00816.73
8.3.180.0100.00517.29
8.3.170.0120.00619.06
8.3.160.0090.00916.54
8.3.150.0040.01118.76
8.3.140.0030.00618.88
8.3.130.0100.00018.47
8.3.120.0090.00020.85
8.3.110.0040.00420.94
8.3.100.0000.01016.60
8.3.90.0080.00826.77
8.3.80.0090.00018.18
8.3.70.0060.01216.75
8.3.60.0170.00318.36
8.3.50.0140.00716.50
8.3.40.0110.00420.29
8.3.30.0130.00721.86
8.3.20.0040.00424.18
8.3.10.0090.00924.66
8.3.00.0030.00726.16
8.2.320.0090.01017.96
8.2.310.0130.00518.21
8.2.300.0120.01020.53
8.2.290.0150.00320.51
8.2.280.0060.00218.31
8.2.270.0110.00716.97
8.2.260.0090.00018.39
8.2.250.0050.00318.46
8.2.240.0090.00017.05
8.2.230.0070.00722.58
8.2.220.0050.00324.06
8.2.210.0040.01426.77
8.2.200.0070.00718.42
8.2.190.0150.00018.20
8.2.180.0070.01416.75
8.2.170.0110.01119.08
8.2.160.0110.00322.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0110.00726.16
8.2.120.0050.00319.26
8.2.110.0110.01020.37
8.2.100.0120.00019.16
8.2.90.0120.00618.86
8.2.80.0270.00318.91
8.2.70.0310.01018.64
8.2.60.0200.01018.73
8.2.50.0140.00418.55
8.2.40.0230.00318.69
8.2.30.0200.00318.61
8.2.20.0230.00618.61
8.2.10.0190.00319.21
8.2.00.0150.00019.03
8.1.340.0120.00821.78
8.1.330.0130.00621.68
8.1.320.0120.00616.17
8.1.310.0000.00818.34
8.1.300.0030.00617.87
8.1.290.0100.00330.84
8.1.280.0140.00725.92
8.1.270.0060.01323.99
8.1.260.0070.00726.35
8.1.250.0040.00428.09
8.1.240.0120.00418.41
8.1.230.0160.01318.53
8.1.220.0250.00918.48
8.1.210.0230.00819.76
8.1.200.0190.00918.49
8.1.190.0180.00018.38
8.1.180.0240.00818.25
8.1.170.0150.00018.54
8.1.160.0180.01118.61
8.1.150.0180.01220.42
8.1.140.0170.00018.48
8.1.130.0190.01318.39
8.1.120.0250.00318.28
8.1.110.0160.01018.29
8.1.100.0150.00418.30
8.1.90.0060.00918.46
8.1.80.0030.01218.48
8.1.70.0140.00318.46
8.1.60.0160.00318.77
8.1.50.0160.00418.58
8.1.40.0220.00418.61
8.1.30.0110.00318.85
8.1.20.0260.01018.66
8.1.10.0160.01018.81
8.1.00.0250.00018.61
8.0.300.0130.00317.77
8.0.290.0330.00317.83
8.0.280.0310.00017.82
8.0.270.0200.01617.64
8.0.260.0220.00717.82
8.0.250.0240.01217.73
8.0.240.0210.00917.70
8.0.230.0180.00718.17
8.0.220.0240.00917.77
8.0.210.0230.00617.80
8.0.200.0170.00017.82
8.0.190.0190.00917.60
8.0.180.0280.00717.82
8.0.170.0200.00017.86
8.0.160.0310.00017.82
8.0.150.0140.00317.75
8.0.140.0150.00317.70
8.0.130.0220.00318.08
8.0.120.0260.00717.78
8.0.110.0140.01417.88
8.0.100.0080.00817.78
8.0.90.0150.01517.48
8.0.80.0170.01017.74
8.0.70.0060.00917.80
8.0.60.0370.00317.70
8.0.50.0290.00617.77
8.0.30.0240.00717.69
8.0.20.0250.01517.60
8.0.10.0260.01317.86

preferences:
75.64 ms | 1132 KiB | 5 Q