3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variableName = 'foo'; // Create new variable with the name defined in variable $variableName $obj = (object) array( "foo" => "1", "bar" => "2", ); echo $obj->${$variableName}; ${$variableName} = 'MyValue'; //Outputs: string(7) "MyValue" echo $foo;

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.60.0090.00918.43
8.3.50.0110.00622.11
8.3.40.0100.00618.68
8.3.30.0140.00019.14
8.3.20.0040.00420.39
8.3.10.0040.00423.52
8.3.00.0040.00419.02
8.2.180.0110.00718.43
8.2.170.0170.00322.96
8.2.160.0180.00022.14
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.56
8.2.110.0060.00322.26
8.2.100.0040.00817.84
8.2.90.0000.00817.75
8.2.80.0030.00617.97
8.2.70.0090.00017.92
8.2.60.0080.00018.09
8.2.50.0050.00318.10
8.2.40.0040.00421.21
8.2.30.0030.00519.23
8.2.20.0030.00617.67
8.2.10.0080.00018.08
8.2.00.0040.00417.80
8.1.280.0040.01525.92
8.1.270.0030.00619.01
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00623.75
8.1.230.0080.00419.02
8.1.220.0060.00317.74
8.1.210.0040.00818.77
8.1.200.0060.00317.23
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0040.00418.72
8.1.160.0000.00718.94
8.1.150.0040.00418.89
8.1.140.0040.00417.42
8.1.130.0030.00717.93
8.1.120.0050.00317.35
8.1.110.0050.00217.37
8.1.100.0030.00517.45
8.1.90.0000.00717.46
8.1.80.0000.00717.46
8.1.70.0000.00717.42
8.1.60.0060.00317.65
8.1.50.0030.00617.58
8.1.40.0030.00517.53
8.1.30.0000.00817.62
8.1.20.0000.00717.66
8.1.10.0030.00617.50
8.1.00.0000.00717.33
8.0.300.0040.00419.72
8.0.290.0000.00916.75
8.0.280.0030.00318.41
8.0.270.0000.00717.13
8.0.260.0030.00317.25
8.0.250.0030.00316.99
8.0.240.0030.00516.91
8.0.230.0040.00416.91
8.0.220.0030.00316.85
8.0.210.0060.00016.94
8.0.200.0060.00017.08
8.0.190.0030.00517.04
8.0.180.0040.00416.95
8.0.170.0040.00416.96
8.0.160.0000.00717.00
8.0.150.0000.00716.80
8.0.140.0000.00716.89
8.0.130.0030.00313.44
8.0.120.0030.00516.94
8.0.110.0020.00516.87
8.0.100.0040.00416.93
8.0.90.0000.00716.79
8.0.80.0030.01316.85
8.0.70.0000.00716.98
8.0.60.0050.00216.85
8.0.50.0000.00816.79
8.0.30.0110.00817.17
8.0.20.0100.01117.40
8.0.10.0000.00716.98
8.0.00.0100.00816.63
7.4.330.0020.00215.20
7.4.320.0000.00816.61
7.4.300.0060.00016.51
7.4.290.0030.00316.59
7.4.280.0040.00416.59
7.4.270.0030.00316.63
7.4.260.0040.00416.60
7.4.250.0050.00216.32
7.4.240.0040.00416.49
7.4.230.0030.00316.68
7.4.220.0060.01216.49
7.4.210.0110.01216.64
7.4.200.0000.00716.63
7.4.160.0040.01216.41
7.4.150.0190.00617.40
7.4.140.0130.00717.86
7.4.130.0100.00816.49
7.4.120.0110.00616.59
7.4.110.0100.01316.64
7.4.100.0110.00716.59
7.4.90.0060.00916.72
7.4.80.0070.01019.39
7.4.70.0300.03516.36
7.4.60.0120.00316.52
7.4.50.0030.00316.25
7.4.40.0030.01316.52
7.4.30.0070.01016.41
7.4.00.0090.00615.16
7.3.330.0030.00313.22
7.3.320.0000.00513.09
7.3.310.0030.00316.19
7.3.300.0030.00316.36
7.3.290.0090.00516.30
7.3.280.0110.00616.36
7.3.270.0080.00917.40
7.3.260.0070.01016.22
7.3.250.0090.00816.31
7.3.240.0040.01316.55
7.3.230.0070.01016.43
7.3.210.0070.01016.57
7.3.200.0070.01019.39
7.3.190.0070.01016.44
7.3.180.0070.00816.44
7.3.170.0100.00616.47
7.3.160.0060.01016.45
7.2.330.0090.00816.66
7.2.320.0100.01016.29
7.2.310.0120.00616.50
7.2.300.0030.01416.65
7.2.290.0180.00716.64
7.2.60.0070.00716.96
7.2.00.0040.01119.08
7.1.200.0060.00615.65
7.1.100.0060.00918.14
7.1.70.0040.00416.80
7.1.60.0100.01319.22
7.1.50.0070.01516.82
7.1.00.0100.06722.37
7.0.200.0000.00716.78
7.0.140.0070.07021.92
7.0.60.0070.08019.99
7.0.50.0030.04017.88
7.0.40.0070.07020.02
7.0.30.0200.04720.01
7.0.20.0130.04720.13
7.0.10.0070.04320.24
7.0.00.0100.08020.18
5.6.280.0000.07721.00
5.6.210.0100.07020.51
5.6.200.0100.07718.15
5.6.190.0100.05020.36
5.6.180.0370.07720.68
5.6.170.0130.04720.71
5.6.160.0070.06320.49
5.6.150.0070.04718.18
5.6.140.0100.08318.20
5.6.130.0130.07718.15
5.6.120.0070.07320.89
5.6.110.0130.08020.99
5.6.100.0070.06321.11
5.6.90.0030.08320.98
5.6.80.0070.03320.41
5.5.350.0230.08020.32
5.5.340.0100.07317.92
5.5.330.0130.06720.11
5.5.320.0100.09020.29
5.5.310.0400.07020.27
5.5.300.0100.07717.94
5.5.290.0100.07017.95
5.5.280.0130.08020.97
5.5.270.0030.04720.79
5.5.260.0000.04720.94
5.5.250.0130.03020.68
5.5.240.0030.06720.15
5.4.450.0600.06319.11
5.4.440.0570.06719.56
5.4.430.0230.04719.58
5.4.420.0170.05319.63
5.4.410.0130.05719.13
5.4.400.0030.06319.20
5.4.390.0200.05019.12
5.4.380.0330.04318.63
5.4.370.0100.08018.50
5.4.360.0300.04318.57
5.4.350.0130.06318.72
5.4.340.0200.05318.61
5.4.320.0300.04718.65
5.4.310.0200.05018.49
5.4.300.0270.05018.77
5.4.290.0230.05018.72
5.4.280.0300.07018.58
5.4.270.0170.06018.46
5.4.260.0270.05018.68
5.4.250.0330.04718.77
5.4.240.0200.06018.77
5.4.230.0270.04718.67
5.4.220.0200.05718.59
5.4.210.0270.04718.48
5.4.200.0200.05316.50
5.4.190.0200.05718.45
5.4.180.0270.07318.68
5.4.170.0230.06018.68
5.4.160.0370.06318.44
5.4.150.0470.03718.70
5.4.140.0270.05316.17
5.4.130.0200.05016.26
5.4.120.0270.04716.16
5.4.110.0170.06016.24
5.4.100.0430.05316.20
5.4.90.0270.05716.21
5.4.80.0330.03716.10
5.4.70.0130.05716.04
5.4.60.0200.05016.13
5.4.50.0230.05016.28
5.4.40.0200.05716.12
5.4.30.0200.05016.15
5.4.20.0170.05716.03
5.4.10.0170.05016.22
5.4.00.0130.05715.49
5.3.290.0200.05714.69
5.3.280.0200.05314.48
5.3.270.0170.06014.60
5.3.260.0200.05314.55
5.3.250.0130.05714.61
5.3.240.0270.05314.65
5.3.230.0200.05714.69
5.3.220.0130.06714.46
5.3.210.0230.05014.57
5.3.200.0300.04014.54
5.3.190.0230.05314.47
5.3.180.0230.05014.63
5.3.170.0270.04314.66
5.3.160.0230.05714.51
5.3.150.0230.05014.65
5.3.140.0200.05014.67
5.3.130.0200.06014.45
5.3.120.0170.06014.61
5.3.110.0230.05314.47
5.3.100.0300.04314.01
5.3.90.0230.05713.93
5.3.80.0230.06314.01
5.3.70.0200.05314.05
5.3.60.0200.05314.09
5.3.50.0270.04713.93
5.3.40.0170.06014.04
5.3.30.0300.05013.87
5.3.20.0270.05713.60
5.3.10.0230.04713.75
5.3.00.0370.04313.60
5.2.170.0170.04711.20
5.2.160.0100.05011.30
5.2.150.0170.04011.19
5.2.140.0130.04311.20
5.2.130.0230.03311.11
5.2.120.0170.03711.13
5.2.110.0230.03011.10
5.2.100.0170.03711.10
5.2.90.0100.04711.13
5.2.80.0130.04311.09
5.2.70.0170.04011.14
5.2.60.0130.04310.97
5.2.50.0200.03711.15
5.2.40.0170.03711.13
5.2.30.0170.04010.91
5.2.20.0170.03310.92
5.2.10.0230.04010.90
5.2.00.0100.05010.75
5.1.60.0100.03710.13
5.1.50.0130.0339.95
5.1.40.0230.02310.04
5.1.30.0170.04010.38
5.1.20.0170.03310.44
5.1.10.0100.03710.20
5.1.00.0130.03710.06
5.0.50.0070.0308.57
5.0.40.0070.0308.39
5.0.30.0100.0408.29
5.0.20.0100.0238.22
5.0.10.0070.0308.34
5.0.00.0070.0438.19
4.4.90.0130.0176.80
4.4.80.0070.0206.80
4.4.70.0130.0176.80
4.4.60.0170.0136.80
4.4.50.0070.0206.80
4.4.40.0070.0406.80
4.4.30.0030.0236.80
4.4.20.0070.0236.80
4.4.10.0070.0236.80
4.4.00.0070.0376.80
4.3.110.0100.0206.80
4.3.100.0130.0176.80
4.3.90.0070.0236.80
4.3.80.0070.0336.80
4.3.70.0070.0206.80
4.3.60.0070.0206.80
4.3.50.0100.0206.80
4.3.40.0100.0376.80
4.3.30.0000.0276.80
4.3.20.0030.0236.80
4.3.10.0070.0206.80
4.3.00.0070.0277.57

preferences:
55.51 ms | 401 KiB | 5 Q