3v4l.org

run code in 500+ PHP versions simultaneously
<?php class z { public readonly int $p; public readonly int $q; public function __construct() { $this->p = 1; } } $x = new z; // foreach skips undefined properties, readonly or not foreach($x as $k => $v) { print $k . " " . $v . PHP_EOL; } echo $x->q; ?>

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.0110.01017.00
8.5.50.0050.00516.96
8.5.30.0030.00417.88
8.5.20.0100.00720.11
8.5.10.0120.01016.79
8.5.00.0120.01020.33
8.4.210.0060.00919.59
8.4.180.0120.01019.84
8.4.170.0120.00923.75
8.4.160.0100.01022.14
8.4.150.0060.00617.78
8.4.140.0130.01117.84
8.4.130.0110.00919.42
8.4.120.0070.00323.79
8.4.110.0120.00922.29
8.4.100.0170.00518.25
8.4.90.0120.00818.27
8.4.80.0190.00918.23
8.4.70.0220.00617.84
8.4.60.0420.00818.03
8.4.50.0420.00918.05
8.4.40.0420.00617.77
8.4.30.0460.00517.75
8.4.20.0430.00817.75
8.4.10.0380.00817.78
8.3.300.0130.00720.73
8.3.290.0080.01220.63
8.3.280.0160.00818.44
8.3.270.0110.00916.79
8.3.260.0120.00816.72
8.3.250.0020.00719.04
8.3.240.0180.00117.20
8.3.230.0030.00516.70
8.3.220.0190.00816.97
8.3.210.0150.01116.97
8.3.200.0420.01016.97
8.3.190.0370.00816.97
8.3.180.0380.01016.97
8.3.170.0380.01116.97
8.3.160.0370.00716.97
8.3.150.0360.00516.97
8.3.140.0270.00616.97
8.3.130.0190.00116.97
8.3.120.0300.00616.97
8.3.110.0260.00616.97
8.3.100.0410.00916.97
8.3.90.0320.00516.97
8.3.80.0180.00416.97
8.3.70.0220.00316.97
8.3.60.0200.00316.97
8.3.50.0350.00616.97
8.3.40.0210.00117.64
8.3.30.0180.00317.74
8.3.20.0180.00217.65
8.3.10.0380.00817.81
8.3.00.0160.00417.71
8.2.300.0110.01120.45
8.2.290.0100.00920.55
8.2.280.0140.00416.97
8.2.270.0220.00416.97
8.2.260.0310.01116.97
8.2.250.0340.00816.97
8.2.240.0320.01016.97
8.2.230.0360.00616.97
8.2.220.0360.00716.97
8.2.210.0330.01016.97
8.2.200.0340.00816.97
8.2.190.0350.00816.97
8.2.180.0420.01016.97
8.2.170.0400.00717.64
8.2.160.0240.00417.64
8.2.150.0370.00817.64
8.2.140.0400.00517.50
8.2.130.0350.01017.69
8.2.120.0380.00717.48
8.2.110.0360.00617.67
8.2.100.0250.00517.65
8.2.90.0350.00817.59
8.2.80.0360.00917.68
8.2.70.0360.00817.37
8.2.60.0330.01117.44
8.2.50.0400.01017.54
8.2.40.0390.00717.61
8.2.30.0370.01017.51
8.2.20.0310.00917.43
8.2.10.0320.00917.48
8.2.00.0310.00617.46
8.1.340.0130.00720.32

preferences:
78.26 ms | 861 KiB | 5 Q