3v4l.org

run code in 300+ PHP versions simultaneously
<?php $great = 'abc'; ${'great '} = 'def'; const great = 'ghi'; $ghi = '...'; ${"ෝ"} = 'Meh'; // ${\u{ddd}} = 'Meh'; var_dump("${great }"); // outputs the constant value's variable value var_dump("${'great '}"); // outputs the ${'great '} variable value var_dump("${great}"); // outputs the $great variable value var_dump("${'ෝ'}"); // outputs the ${\u{ddd}} variable value var_dump("${ෝ}"); // outputs the ${\u{ddd}} variable value /* Even though "great " is not a valid variable name, neither is "\u{ddd}" but that still works. I'd therefore expect "${great }" to firstly search for a variable named "great " before falling back to evaluating the expression first. */

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.3.70.0180.00316.75
8.3.60.0140.00418.43
8.3.50.0180.00321.15
8.3.40.0120.00318.75
8.3.30.0090.00618.54
8.3.20.0000.00818.57
8.3.10.0030.00521.59
8.3.00.0070.00319.01
8.2.180.0100.01018.54
8.2.170.0160.00022.96
8.2.160.0100.00319.21
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0070.00021.07
8.2.120.0040.00426.35
8.2.110.0070.00321.07
8.2.100.0000.01117.79
8.2.90.0040.00419.04
8.2.80.0050.00317.97
8.2.70.0080.00017.25
8.2.60.0040.00417.80
8.2.50.0040.00418.10
8.2.40.0040.00420.55
8.2.30.0050.00520.68
8.2.20.0000.00817.76
8.2.10.0000.00818.00
8.2.00.0080.00017.93
8.1.280.0070.00725.92
8.1.270.0050.00323.58
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00620.98
8.1.230.0080.00417.42
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00717.38
8.1.190.0060.00317.25
8.1.180.0030.00618.10
8.1.170.0060.00318.65
8.1.160.0000.00818.96
8.1.150.0040.00418.73
8.1.140.0000.00719.43
8.1.130.0000.00717.71
8.1.120.0040.00417.39
8.1.110.0000.00717.33
8.1.100.0050.00217.49
8.1.90.0040.00417.40
8.1.80.0000.00717.35
8.1.70.0040.00417.41
8.1.60.0060.00317.56
8.1.50.0040.00417.39
8.1.40.0080.00017.47
8.1.30.0030.00617.68
8.1.20.0060.00317.61
8.1.10.0000.00717.13
8.1.00.0020.00517.27
8.0.300.0080.00018.77
8.0.290.0070.00016.58
8.0.280.0040.00418.49
8.0.270.0000.00717.16
8.0.260.0030.00517.25
8.0.250.0030.00316.94
8.0.240.0030.00316.93
8.0.230.0040.00416.91
8.0.220.0030.00416.80
8.0.210.0000.00816.76
8.0.200.0000.00716.97
8.0.190.0040.00417.01
8.0.180.0080.00016.80
8.0.170.0040.00416.90
8.0.160.0000.00716.81
8.0.150.0000.00716.76
8.0.140.0000.00716.88
8.0.130.0060.00013.38
8.0.120.0040.00416.82
8.0.110.0000.00816.87
8.0.100.0030.00516.93
8.0.90.0070.00016.77
8.0.80.0000.01816.88
8.0.70.0030.00516.76
8.0.60.0030.00316.95
8.0.50.0000.00716.73
8.0.30.0090.00817.11
8.0.20.0120.00817.40
8.0.10.0040.00416.89
8.0.00.0140.00916.83
7.4.330.0000.00515.08
7.4.320.0030.00316.52
7.4.300.0000.00816.51
7.4.290.0030.00316.60
7.4.280.0040.00416.41
7.4.270.0030.00316.50
7.4.260.0070.00016.51
7.4.250.0070.00016.57
7.4.240.0000.00716.60
7.4.230.0000.00716.62
7.4.220.0070.01416.54
7.4.210.0130.00716.37
7.4.200.0040.00416.43
7.4.160.0030.01316.63
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0100.00716.60
7.4.120.0100.00716.53
7.4.110.0140.00316.64
7.4.100.0100.01016.34
7.4.90.0070.01016.52
7.4.80.0100.01019.39
7.4.70.0100.00616.53
7.4.60.0000.01516.50
7.4.50.0090.00616.53
7.4.40.0080.00816.47
7.4.30.0100.00616.44
7.4.00.0000.01114.84
7.3.330.0000.00513.13
7.3.320.0000.00513.02
7.3.310.0000.00716.34
7.3.300.0040.00416.25
7.3.290.0090.00716.25
7.3.280.0100.01016.25
7.3.270.0070.01117.40
7.3.260.0070.01716.54
7.3.250.0140.00716.26
7.3.240.0060.01116.47
7.3.230.0100.00716.39
7.3.210.0110.00516.50
7.3.200.0030.01316.17
7.3.190.0030.01216.20
7.3.180.0060.00916.34
7.3.170.0090.00616.48
7.3.160.0340.01516.26
7.3.120.0090.00614.70
7.3.110.0030.00914.83
7.3.100.0110.00314.67
7.3.90.0100.00314.88
7.3.80.0070.00514.90
7.3.70.0020.01114.71
7.3.60.0090.00314.69
7.3.50.0080.00714.75
7.3.40.0030.00814.65
7.3.30.0060.00614.83
7.3.20.0030.01216.68
7.3.10.0080.00716.63
7.3.00.0040.00916.49
7.2.330.0160.01016.25
7.2.320.0140.01016.72
7.2.310.0110.01416.54
7.2.300.0080.00916.55
7.2.290.0050.01016.65
7.2.240.0070.00814.85
7.2.230.0060.00614.81
7.2.220.0070.00815.11
7.2.210.0050.00714.75
7.2.200.0030.00915.04
7.2.190.0060.01014.98
7.2.180.0070.00614.94
7.2.170.0080.00814.96
7.2.160.0020.01415.00
7.2.150.0060.00916.78
7.2.140.0070.00817.01
7.2.130.0040.00816.66
7.2.120.0080.00516.71
7.2.110.0090.00616.88
7.2.100.0030.01016.86
7.2.90.0100.00616.74
7.2.80.0020.01316.60
7.2.70.0030.01116.49
7.2.60.0020.01316.97
7.2.50.0070.00916.80
7.2.40.0060.00916.84
7.2.30.0070.00516.73
7.2.20.0060.00916.88
7.2.10.0070.00816.83
7.2.00.0080.00517.52
7.1.330.0050.01115.83
7.1.320.0060.00515.78
7.1.310.0060.00615.69
7.1.300.0100.00515.56
7.1.290.0050.00815.70
7.1.280.0070.00815.68
7.1.270.0060.00515.69
7.1.260.0090.00315.70
7.1.250.0090.00715.81
7.1.200.0090.00615.30
7.1.100.0060.00818.11
7.1.70.0030.00617.22
7.1.60.0070.01720.41
7.1.00.0070.07322.57
7.0.200.0070.01116.71
7.0.60.0100.08021.71
7.0.50.0270.05320.45
7.0.40.0170.05720.44
7.0.30.0330.06020.43
7.0.20.0470.04720.44
7.0.10.0330.05720.27
7.0.00.0270.07020.25
5.6.280.0030.07320.99
5.6.210.0070.08320.75
5.6.200.0100.06718.23
5.6.190.0300.05721.15
5.6.180.0270.05721.09
5.6.170.0300.05720.99
5.6.160.0200.05721.13
5.6.150.0270.04721.16
5.6.140.0200.05021.00
5.6.130.0170.06721.06
5.6.120.0230.05020.93
5.6.110.0130.06021.07
5.6.100.0270.05321.08
5.6.90.0400.05020.99
5.6.80.0200.06320.41
5.6.70.0270.06020.52
5.6.60.0330.04720.46
5.6.50.0230.05320.30
5.6.40.0170.05720.44
5.6.30.0130.05720.40
5.6.20.0230.04720.38
5.6.10.0370.04020.44
5.6.00.0100.06020.48
5.5.350.0400.06320.36
5.5.340.0070.04017.92
5.5.330.0230.07320.98
5.5.320.0400.04720.98
5.5.310.0330.05720.86
5.5.300.0130.06320.66
5.5.290.0330.05020.88
5.5.280.0170.06020.79
5.5.270.0230.05020.85
5.5.260.0300.05720.77
5.5.250.0230.06320.61
5.5.240.0270.05720.39
5.5.230.0370.05720.20
5.5.220.0270.06020.39
5.5.210.0270.05020.22
5.5.200.0270.05020.23
5.5.190.0100.06020.36
5.5.180.0170.05320.23
5.5.160.0170.05720.22
5.5.150.0200.05020.19
5.5.140.0100.07320.18
5.5.130.0170.05320.22
5.5.120.0130.05320.19
5.5.110.0200.05320.32
5.5.100.0230.04720.26
5.5.90.0200.04720.14
5.5.80.0170.05320.11
5.5.70.0270.06720.17
5.5.60.0170.05320.11
5.5.50.0170.05320.10
5.5.40.0170.05020.14
5.5.30.0200.05320.13
5.5.20.0200.05020.05
5.5.10.0130.06019.99
5.5.00.0200.05319.98

preferences:
55.19 ms | 401 KiB | 5 Q