3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "7.0.0" or die(); $foo = 'foo'; $bar = new stdClass; $bar->$foo = array(10, 20, 30); // $bar->foo => array(10, 20, 30) $bar->{$foo[0]} = 42; // dynamic prop $f = 42 fr 0 offset of ‘foo’ $bar->$foo[0] = 42; // zeroth element of array $foo set to 42

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)
7.4.10.0030.01214.88
7.4.00.0080.01014.88
7.3.130.0050.01314.91
7.3.120.0090.00514.74
7.3.110.0060.01214.69
7.3.100.0050.01014.76
7.3.90.0050.00914.79
7.3.80.0040.00814.94
7.3.70.0060.00414.89
7.3.60.0030.01115.00
7.3.50.0130.00214.91
7.3.40.0090.00314.84
7.3.30.0060.00614.90
7.3.20.0030.01016.60
7.3.10.0050.01116.66
7.3.00.0090.00616.72
7.2.260.0100.00815.10
7.2.250.0050.01114.91
7.2.240.0030.01215.01
7.2.230.0060.00814.87
7.2.220.0080.00915.34
7.2.210.0080.00715.06
7.2.200.0100.00615.08
7.2.190.0050.00815.09
7.2.180.0110.00514.93
7.2.170.0020.00915.05
7.2.160.0080.00415.20
7.2.150.0050.01116.93
7.2.140.0060.00816.93
7.2.130.0090.00716.99
7.2.120.0070.00716.78
7.2.110.0060.00817.00
7.2.100.0030.00917.00
7.2.90.0050.00717.07
7.2.80.0060.00616.77
7.2.70.0050.01016.99
7.2.60.0050.00816.79
7.2.50.0070.00516.89
7.2.40.0070.00816.82
7.2.30.0060.00817.04
7.2.20.0090.00716.87
7.2.10.0050.00916.91
7.2.00.0070.00617.67
7.1.330.0090.00615.81
7.1.320.0080.00515.81
7.1.310.0090.00315.97
7.1.300.0050.00715.77
7.1.290.0050.00915.81
7.1.280.0030.01115.87
7.1.270.0050.00615.65
7.1.260.0090.00615.76
7.1.250.0050.00815.67
7.1.240.0070.00815.73
7.1.230.0020.01515.78
7.1.220.0070.00615.86
7.1.210.0050.00815.71
7.1.200.0030.00815.86
7.1.190.0050.00815.75
7.1.180.0050.00815.79
7.1.170.0040.01115.84
7.1.160.0060.00915.69
7.1.150.0040.00715.65
7.1.140.0050.01015.76
7.1.130.0050.00715.93
7.1.120.0050.01015.74
7.1.110.0060.00715.82
7.1.100.0040.00716.50
7.1.90.0090.00315.86
7.1.80.0050.00715.79
7.1.70.0030.00616.21
7.1.60.0080.00617.04
7.1.50.0110.00616.20
7.1.40.0060.00615.84
7.1.30.0050.01015.82
7.1.20.0020.01116.01
7.1.10.0090.00515.80
7.1.00.0040.03317.97
7.0.330.0070.00515.28
7.0.320.0070.00815.41
7.0.310.0010.01215.21
7.0.300.0070.00615.35
7.0.290.0050.01015.23
7.0.280.0050.00515.39
7.0.270.0040.00815.39
7.0.260.0010.01115.45
7.0.250.0030.01215.17
7.0.240.0050.00815.43
7.0.230.0030.00915.50
7.0.220.0020.01015.43
7.0.210.0050.00815.44
7.0.200.0140.00215.79
7.0.190.0070.00715.20
7.0.180.0040.00915.25
7.0.170.0090.00515.29
7.0.160.0060.00815.49
7.0.150.0090.00615.33
7.0.140.0050.00715.39
7.0.130.0030.00815.44
7.0.120.0050.00415.34
7.0.110.0040.01115.46
7.0.100.0070.00515.22
7.0.90.0060.01015.28
7.0.80.0060.00815.42
7.0.70.0040.00715.29
7.0.60.0050.03217.52
7.0.50.0070.02616.20
7.0.40.0050.01915.75
7.0.30.0150.02815.66
7.0.20.0160.02915.70
7.0.10.0070.03215.73
7.0.00.0100.03115.77
5.6.400.0020.01314.41
5.6.390.0060.00814.16
5.6.380.0070.00714.39
5.6.370.0050.00714.36
5.6.360.0070.00914.42
5.6.350.0050.00714.17
5.6.340.0030.00814.31
5.6.330.0030.01014.30
5.6.320.0080.00514.29
5.6.310.0030.01114.42
5.6.300.0050.00814.28
5.6.290.0020.01214.37
5.6.280.0040.01716.72
5.6.270.0070.00914.22
5.6.260.0030.01214.32
5.6.250.0020.00914.32
5.6.240.0030.00714.33
5.6.230.0010.01014.13
5.6.220.0030.00914.35
5.6.210.0060.03316.42
5.6.200.0070.03015.50
5.6.190.0040.02716.37
5.6.180.0130.02916.36
5.6.170.0140.03016.30
5.6.160.0030.01916.38
5.6.150.0050.01815.52
5.6.140.0050.03315.48
5.6.130.0030.03415.64
5.6.120.0060.02616.47
5.6.110.0070.03016.53
5.6.100.0030.02116.62
5.6.90.0080.02816.50
5.6.80.0050.03016.17
5.6.70.0080.00614.13
5.6.60.0050.00714.24
5.6.50.0030.01014.27
5.6.40.0030.01014.21
5.6.30.0040.00914.15
5.6.20.0030.00814.20
5.6.10.0060.00914.06
5.6.00.0050.00814.19
5.5.380.0070.00614.07
5.5.370.0070.00314.26
5.5.360.0070.00814.31
5.5.350.0140.01516.33
5.5.340.0060.03215.59
5.5.330.0070.02916.25
5.5.320.0150.02916.26
5.5.310.0160.02916.09
5.5.300.0060.02515.35
5.5.290.0070.02815.35
5.5.280.0060.02916.42
5.5.270.0050.01716.50
5.5.260.0050.01716.54
5.5.250.0060.02016.31
5.5.240.0110.02816.22
5.5.230.0070.00613.96
5.5.220.0060.00714.04
5.5.210.0090.00313.98
5.5.200.0050.00714.12
5.5.190.0060.00814.07
5.5.180.0050.00614.11
5.5.170.0060.00813.97
5.5.160.0060.00614.13
5.5.150.0040.00714.21
5.5.140.0030.00814.17
5.5.130.0040.00614.23
5.5.120.0080.00514.22
5.5.110.0060.00514.13
5.5.100.0000.01514.04
5.5.90.0030.01214.07
5.5.80.0120.00314.24
5.5.70.0070.00314.17
5.5.60.0030.00614.16
5.5.50.0020.01013.91
5.5.40.0070.00814.31
5.5.30.0100.00614.29
5.5.20.0110.00314.04
5.5.10.0020.00813.93
5.5.00.0050.00714.17

preferences:
41.52 ms | 400 KiB | 5 Q