3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __construct() { $this->a = "hello"; $this->b = "hi"; $this->val = "howdy"; $val = "a"; echo $this->{$val}; // outputs "hello" echo "\n"; $val = "b"; echo $this->${val}; // outputs "hi" echo "\n"; echo $this->val; //outputs "howdy" echo "\n"; echo $this->{"val"}; } } $foo = new 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.70.0150.00616.50
8.3.60.0040.01116.63
8.3.50.0120.00721.02
8.3.40.0090.00918.96
8.3.30.0070.00719.02
8.3.20.0040.00420.21
8.3.10.0080.00023.66
8.3.00.0030.00619.34
8.2.190.0120.00618.54
8.2.180.0070.00716.75
8.2.170.0120.00322.96
8.2.160.0070.00720.46
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0060.00317.50
8.2.120.0040.00426.35
8.2.110.0060.01220.35
8.2.100.0090.00318.03
8.2.90.0030.00519.27
8.2.80.0070.00317.97
8.2.70.0040.00417.63
8.2.60.0060.00317.80
8.2.50.0060.00318.07
8.2.40.0040.00419.32
8.2.30.0030.00520.54
8.2.20.0040.00417.62
8.2.10.0030.00517.99
8.2.00.0040.00418.18
8.1.280.0100.00725.92
8.1.270.0000.00823.82
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0000.00824.02
8.1.230.0060.00619.56
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0050.00517.35
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0050.00318.71
8.1.160.0000.00722.01
8.1.150.0000.00718.80
8.1.140.0000.00819.49
8.1.130.0030.00317.66
8.1.120.0000.00817.53
8.1.110.0040.00417.52
8.1.100.0040.00417.44
8.1.90.0000.00717.42
8.1.80.0030.00617.47
8.1.70.0030.00317.39
8.1.60.0080.00017.57
8.1.50.0080.00017.47
8.1.40.0100.00017.42
8.1.30.0080.00017.62
8.1.20.0040.00417.52
8.1.10.0000.00817.46
8.1.00.0030.00617.52
8.0.300.0060.00318.77
8.0.290.0000.00716.88
8.0.280.0030.00318.41
8.0.270.0070.00017.16
8.0.260.0000.00617.16
8.0.250.0030.00316.93
8.0.240.0040.00416.97
8.0.230.0030.00616.92
8.0.220.0030.00316.96
8.0.210.0030.00516.96
8.0.200.0060.00016.90
8.0.190.0030.00516.97
8.0.180.0080.00016.87
8.0.170.0000.00716.91
8.0.160.0040.00416.92
8.0.150.0080.00016.90
8.0.140.0000.00716.86
8.0.130.0030.00313.31
8.0.120.0000.00816.89
8.0.110.0070.00016.89
8.0.100.0070.00016.93
8.0.90.0050.00316.78
8.0.80.0120.00616.90
8.0.70.0070.00016.73
8.0.60.0040.00416.83
8.0.50.0040.00416.98
8.0.30.0060.01117.18
8.0.20.0110.00917.40
8.0.10.0030.00517.09
8.0.00.0090.00916.78
7.4.330.0050.00016.82
7.4.320.0030.00316.50
7.4.300.0030.00316.52
7.4.290.0050.00216.39
7.4.280.0080.00016.48
7.4.270.0000.00716.63
7.4.260.0050.00216.65
7.4.250.0040.00416.55
7.4.240.0030.00416.50
7.4.230.0050.00216.67
7.4.220.0150.01216.45
7.4.210.0060.00916.60
7.4.200.0030.00316.66
7.4.160.0100.01316.58
7.4.150.0180.01417.40
7.4.140.0110.01117.86
7.4.130.0070.01016.44
7.4.120.0100.01116.62
7.4.110.0090.00916.48
7.4.100.0110.00616.40
7.4.90.0040.01416.68
7.4.80.0030.01419.39
7.4.70.0150.00916.51
7.4.60.0160.00016.45
7.4.50.0100.00016.41
7.4.40.0060.01016.57
7.4.30.0120.00616.42
7.4.00.0130.00314.88
7.3.330.0030.00313.43
7.3.320.0050.00013.29
7.3.310.0030.00316.46
7.3.300.0000.00716.29
7.3.290.0040.00416.29
7.3.280.0120.00416.43
7.3.270.0060.01217.40
7.3.260.0210.00316.42
7.3.250.0060.01116.44
7.3.240.0090.01216.57
7.3.230.0100.00716.61
7.3.210.0030.01316.62
7.3.200.0100.00516.35
7.3.190.0060.00916.37
7.3.180.0060.01016.62
7.3.170.0140.00316.50
7.3.160.0100.01016.56
7.2.330.0090.00816.58
7.2.320.0120.00916.78
7.2.310.0120.01216.69
7.2.300.0040.01416.78
7.2.290.0150.00416.48
7.2.60.0050.00816.85
7.2.00.0000.01119.34
7.1.200.0000.00915.55
7.1.100.0000.01118.06
7.1.70.0040.00417.12
7.1.60.0070.01819.48
7.1.50.0090.01316.86
7.1.00.0070.07322.33
7.0.200.0240.00914.52
7.0.60.0130.08019.83
7.0.50.0030.04317.88
7.0.40.0130.04020.11
7.0.30.0270.04020.25
7.0.20.0230.07720.24
7.0.10.0030.08320.05
7.0.00.0000.04720.25
5.6.280.0000.06321.15
5.6.210.0070.09020.71
5.6.200.0100.05318.21
5.6.190.0070.04720.61
5.6.180.0270.06320.61
5.6.170.0330.07320.54
5.6.160.0070.08720.39
5.6.150.0030.04318.21
5.6.140.0000.06318.15
5.6.130.0070.08018.27
5.6.120.0100.08021.02
5.6.110.0170.07320.89
5.6.100.0200.07321.11
5.6.90.0100.07021.00
5.6.80.0030.08320.37
5.5.350.4300.04020.43
5.5.340.0100.07717.99
5.5.330.0130.07720.45
5.5.320.0100.08020.23
5.5.310.0130.05020.26
5.5.300.0130.07718.03
5.5.290.0000.05318.10
5.5.280.0100.08320.98
5.5.270.0130.05320.64
5.5.260.0170.07320.76
5.5.250.0070.08020.46
5.5.240.0230.04020.24

preferences:
97.13 ms | 401 KiB | 5 Q