3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class Scratch_1 { } $new = new Scratch_1(); $prop = 'Content-Type'; $new->$prop = 'application/json'; var_dump($new->$prop); // string(16) "application/json" var_dump($new->{'Content-Type'}); $$prop = 'application/json'; var_dump($$prop); // string(16) "application/json" $prop = '10xl'; $new->$prop = '10xl'; var_dump($new->$prop); // string(3) "10xl" var_dump($new); var_dump(get_defined_vars()['Content-Type']); var_dump(${"Content-Type"});

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.0110.01017.64
8.4.130.0050.00617.94
8.4.120.0120.00720.85
8.4.110.0100.00718.89
8.4.100.0120.00918.02
8.4.90.0140.00720.58
8.4.80.0140.00519.11
8.4.70.0140.00919.68
8.4.60.0090.00717.71
8.4.50.0130.00817.71
8.4.40.0150.00417.69
8.4.30.0160.00320.64
8.4.20.0100.01019.66
8.4.10.0060.00319.64
8.3.270.0120.00716.48
8.3.260.0100.00916.40
8.3.250.0100.00818.61
8.3.240.0070.01216.74
8.3.230.0080.01216.74
8.3.220.0070.00818.73
8.3.210.0130.00516.64
8.3.200.0120.00716.64
8.3.190.0120.00616.59
8.3.180.0100.00918.42
8.3.170.0060.01316.91
8.3.160.0140.00419.07
8.3.150.0120.00316.70
8.3.140.0050.00316.79
8.3.130.0090.00916.65
8.3.120.0090.00020.55
8.3.110.0210.00022.58
8.3.100.0320.00422.58
8.3.90.0260.00822.58
8.3.80.0260.00722.58
8.3.70.0270.00722.58
8.3.60.0220.01122.58
8.3.50.0270.00622.58
8.3.40.0210.00722.58
8.3.30.0200.00222.58
8.3.20.0230.00922.58
8.3.10.0270.00722.58
8.3.00.0170.00522.58
8.2.290.0130.00618.97
8.2.280.0060.00416.46
8.2.270.0030.00716.89
8.2.260.0040.00416.38
8.2.250.0060.00318.44
8.2.240.0040.00418.98
8.2.230.0230.00622.58
8.2.220.0240.00622.58
8.2.210.0230.00922.58
8.2.200.0220.00722.58
8.2.190.0280.00522.58
8.2.180.0170.00722.58
8.2.170.0320.00722.58
8.2.160.0320.00522.58
8.2.150.0200.00922.58
8.2.140.0220.00122.58
8.2.130.0250.00122.58
8.2.120.0270.00322.58
8.2.110.0240.00422.58
8.2.100.0250.00522.58
8.2.90.0230.01022.58
8.2.80.0280.00822.58
8.2.70.0200.01122.58
8.2.60.0260.00622.58
8.2.50.0330.00522.58
8.2.40.0320.00622.58
8.2.30.0290.01022.58
8.2.20.0330.00822.58
8.2.10.0250.00922.58
8.2.00.0220.01122.58
8.1.330.0150.00416.55
8.1.320.0110.00817.78
8.1.310.0120.00615.94
8.1.300.0100.01018.54
8.1.290.0330.00522.58
8.1.280.0290.01122.58
8.1.270.0260.00322.58
8.1.260.0320.00922.58
8.1.250.0260.01022.58
8.1.240.0240.00922.58
8.1.230.0300.01122.58
8.1.220.0280.00722.58
8.1.210.0340.00622.58
8.1.200.0220.00522.58
8.1.190.0220.00822.58
8.1.180.0230.00522.58
8.1.170.0160.00422.58
8.1.160.0180.00722.58
8.1.150.0190.00822.58
8.1.140.0170.00622.58
8.1.130.0280.00422.58
8.1.120.0250.00622.58
8.1.110.0230.00422.58
8.1.100.0160.00922.58
8.1.90.0210.00622.58
8.1.80.0250.00722.58
8.1.70.0270.01022.58
8.1.60.0310.00522.58
8.1.50.0350.00322.58
8.1.40.0250.00922.58
8.1.30.0340.01122.58
8.1.20.0350.00922.58
8.1.10.0320.00922.58
8.1.00.0240.00522.58

preferences:
59.81 ms | 403 KiB | 5 Q