3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a' => 1, 'b' => 2, 'c' => 3]; $b = new stdClass(); $b->a = 1; $b->b = 2; $b->c = 3; echo microtime(true); for ($i = 0; $i < 100; $i++) { $a['a']; } echo microtime(true); for ($i = 0; $i < 100; $i++) { $b->a; } echo microtime(true);

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.0180.00315.08
7.4.00.0140.00014.93
7.3.130.0110.01114.68
7.3.120.0070.00414.80
7.3.110.0070.01115.07
7.3.100.0070.00714.71
7.3.90.0060.00914.94
7.3.80.0090.00615.04
7.3.70.0060.00914.92
7.3.60.0070.01114.73
7.3.50.0040.00714.64
7.3.40.0000.01514.74
7.3.30.0000.01214.86
7.3.20.0090.00616.48
7.3.10.0050.00816.62
7.3.00.0030.00616.52
7.2.260.0040.00815.27
7.2.250.0070.01414.99
7.2.240.0040.01114.78
7.2.230.0030.01015.02
7.2.220.0090.00614.94
7.2.210.0000.01315.16
7.2.200.0060.01314.89
7.2.190.0090.00914.66
7.2.180.0030.01014.90
7.2.170.0070.00715.14
7.2.160.0110.00714.93
7.2.150.0030.01016.59
7.2.140.0060.00916.68
7.2.130.0030.00916.91
7.2.120.0050.01016.90
7.2.110.0090.00516.93
7.2.100.0050.01016.75
7.2.90.0300.01116.42
7.2.80.0080.00616.04
7.2.70.0050.00916.38
7.2.60.0420.00716.22
7.2.50.0050.00916.38
7.2.40.0060.00816.38
7.2.30.0080.00716.37
7.2.20.0060.00816.32
7.2.10.0180.00816.44
7.2.00.0080.00716.41
7.1.330.0110.00315.77
7.1.320.0040.00715.89
7.1.310.0060.00915.51
7.1.300.0060.00815.55
7.1.290.0000.01215.67
7.1.280.0060.00615.49
7.1.270.0060.00615.73
7.1.260.0030.00515.86
7.1.250.0020.01215.90
7.1.240.0060.00615.68
7.1.230.0000.00915.54
7.1.220.0080.00415.92
7.1.210.0130.00314.70
7.1.200.0100.00314.87
7.1.190.0080.00914.75
7.1.180.0430.01014.92
7.1.170.0800.00714.85
7.1.160.0570.00414.92
7.1.150.0080.00714.64
7.1.140.0240.00814.92
7.1.130.0320.00714.88
7.1.120.0660.00614.69
7.1.110.0560.00714.85
7.1.100.0480.00714.73
7.1.90.0580.00214.76
7.1.80.0110.00514.70
7.1.70.0970.00914.71
7.1.60.0340.01123.86
7.1.50.1060.00523.72
7.1.40.0560.01023.90
7.1.30.1250.00523.79
7.1.20.0110.01223.79
7.1.10.0030.00914.79
7.1.00.0420.00914.80
7.0.330.0030.00515.40
7.0.320.0070.00715.61
7.0.310.0180.00514.58
7.0.300.0080.00514.42
7.0.290.0340.00514.55
7.0.280.0320.00914.51
7.0.270.0170.00614.51
7.0.260.0720.00714.55
7.0.250.0430.00714.43
7.0.240.0510.00714.36
7.0.230.0740.00514.21
7.0.220.0590.00314.48
7.0.210.0550.00614.49
7.0.200.0080.00814.27
7.0.190.0250.00814.36
7.0.180.0310.00714.45
7.0.170.0830.00714.34
7.0.160.0190.00514.54
7.0.150.0060.00714.45
7.0.140.1080.00514.43
7.0.130.0080.00714.23
7.0.120.0370.00514.67
7.0.110.0470.00814.48
7.0.100.0070.00614.25
7.0.90.0130.00914.38
7.0.80.0770.00714.36
7.0.70.0280.00714.51
7.0.60.0410.00414.41
7.0.50.0170.00314.39
7.0.40.0700.00713.51
7.0.30.0670.01113.53
7.0.20.0100.00813.51
7.0.10.0100.00913.47
7.0.00.0670.00613.44
5.6.400.0040.01414.10
5.6.390.0040.00814.70
5.6.380.0110.00314.51
5.6.370.0040.00814.59
5.6.360.0000.00914.67
5.6.350.0040.00414.55
5.6.340.0000.01614.44
5.6.330.0070.00414.36
5.6.320.0030.00714.69
5.6.310.0060.00614.56
5.6.300.0040.01114.26
5.6.290.0100.00714.08
5.6.280.0000.00814.23
5.6.270.0030.01014.41
5.6.260.0000.00814.15
5.6.250.0100.00314.53
5.6.240.0130.00014.60
5.6.230.0040.00414.27
5.6.220.0000.01514.37
5.6.210.0110.00414.17
5.6.200.0120.00314.30
5.6.190.0040.00814.16
5.6.180.0070.00714.59
5.6.170.0000.00914.45
5.6.160.0070.00314.27
5.6.150.0030.00914.47
5.6.140.0080.00414.13
5.6.130.0070.00414.39
5.6.120.0080.00414.37
5.6.110.0100.00314.38
5.6.100.0000.01414.27
5.6.90.0030.01014.45
5.6.80.0030.00614.18
5.6.70.0040.01114.12
5.6.60.0070.00714.61
5.6.50.0110.00414.00
5.6.40.0000.01214.42
5.6.30.0000.01114.38
5.6.20.0060.00914.16
5.6.10.0110.00314.41
5.6.00.0030.01314.31

preferences:
32.92 ms | 401 KiB | 5 Q