3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = microtime(true); $arr = array(1, 2, 3); $x = &$arr[2]; for ($i = 0; $i < 100000; ++$i) $x; printf("%0.04f\n", microtime(true) - $t); $t = microtime(true); $arr = array(1, 2, 3); for ($i = 0; $i < 100000; ++$i) $arr[2]; printf("%0.04f\n", microtime(true) - $t);

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.01714.78
7.4.00.0030.01315.02
7.3.130.0030.01614.69
7.3.120.0000.01614.65
7.3.110.0070.01415.14
7.3.100.0060.01214.64
7.3.90.0030.01415.01
7.3.80.0030.01014.99
7.3.70.0060.00914.96
7.3.60.0060.00914.62
7.3.50.0040.00714.90
7.3.40.0030.01214.71
7.3.30.0070.01015.07
7.3.20.0030.00816.86
7.3.10.0090.00916.36
7.3.00.0070.01216.42
7.2.260.0170.00314.84
7.2.250.0130.00314.93
7.2.240.0080.00814.98
7.2.230.0000.01815.26
7.2.220.0030.00915.09
7.2.210.0040.01515.18
7.2.200.0080.00315.12
7.2.190.0030.01315.12
7.2.180.0070.01015.19
7.2.170.0030.01314.94
7.2.160.0070.00714.72
7.2.150.0100.00616.97
7.2.140.0090.00616.74
7.2.130.0100.00816.89
7.2.120.0090.01216.91
7.2.110.0100.00616.72
7.2.100.0100.00816.93
7.2.90.0090.00916.74
7.2.80.0060.01316.66
7.2.70.0070.01116.69
7.2.60.0080.00816.98
7.2.50.0090.01116.72
7.2.40.0130.00716.75
7.2.30.0100.00816.81
7.2.20.0090.01016.83
7.2.10.0110.00916.65
7.2.00.0070.01117.66
7.1.330.0040.01615.79
7.1.320.0060.01015.91
7.1.310.0060.01615.72
7.1.300.0000.01615.86
7.1.290.0060.01615.67
7.1.280.0070.01315.61
7.1.270.0030.01815.66
7.1.260.0000.02215.81
7.1.250.0070.01415.65
7.1.240.0000.02115.82
7.1.230.0030.01515.74
7.1.220.0100.01015.89
7.1.210.0090.01215.84
7.1.200.0060.01215.77
7.1.190.0060.01215.91
7.1.180.0040.01915.86
7.1.170.0000.01615.95
7.1.160.0070.01315.84
7.1.150.0000.01515.88
7.1.140.0020.01715.59
7.1.130.0030.01315.68
7.1.120.0030.01515.59
7.1.110.0000.01715.86
7.1.100.0130.00715.79
7.1.90.0030.01615.75
7.1.80.0000.02115.96
7.1.70.0060.00816.42
7.1.60.0040.02017.45
7.1.50.0070.01516.28
7.1.40.0030.01615.74
7.1.30.0000.02115.55
7.1.20.0090.00915.68
7.1.10.0070.01515.84
7.1.00.0030.03419.07
7.0.330.0060.01015.34
7.0.320.0060.01515.51
7.0.310.0070.01415.45
7.0.300.0070.01315.48
7.0.290.0040.01115.50
7.0.280.0090.00915.44
7.0.270.0040.01815.51
7.0.260.0040.01115.48
7.0.250.0040.01815.25
7.0.240.0100.01015.52
7.0.230.0030.01915.34
7.0.220.0040.01415.25
7.0.210.0030.01315.42
7.0.200.0060.00716.03
7.0.190.0030.01415.46
7.0.180.0060.00915.64
7.0.170.0060.01315.32
7.0.160.0100.01015.65
7.0.150.0000.02215.41
7.0.140.0080.04018.71
7.0.130.0060.01215.53
7.0.120.0060.01315.57
7.0.110.0030.01015.47
7.0.100.0130.04317.71
7.0.90.0120.04717.63
7.0.80.0280.05317.73
7.0.70.0180.05117.63
7.0.60.0100.03317.73
7.0.50.0120.03317.85
7.0.40.0070.04816.80
7.0.30.0070.04816.83
7.0.20.0080.02916.74
7.0.10.0070.04316.81
7.0.00.0020.03116.83
5.6.400.0040.02514.71
5.6.390.0100.02214.37
5.6.380.0030.02714.03
5.6.370.0120.01814.30
5.6.360.0150.01514.68
5.6.350.0030.02614.36
5.6.340.0000.02914.27
5.6.330.0100.02314.71
5.6.320.0070.02414.28
5.6.310.0070.02314.10
5.6.300.0060.01914.45
5.6.290.0000.03014.38
5.6.280.0030.05317.48
5.6.270.0070.02414.46
5.6.260.0030.02614.35
5.6.250.0200.03117.34
5.6.240.0050.05317.63
5.6.230.0080.05417.56
5.6.220.0030.04217.54
5.6.210.0070.05617.51
5.6.200.0060.04217.73
5.6.190.0070.05317.88
5.6.180.0030.05717.71
5.6.170.0050.04017.83
5.6.160.0030.05817.75
5.6.150.0080.03517.54
5.6.140.0070.05317.73
5.6.130.0030.05817.64
5.6.120.0100.04617.69
5.6.110.0070.05417.82
5.6.100.0120.05317.61
5.6.90.0070.04517.67
5.6.80.0070.05417.39
5.6.70.0100.04617.24
5.6.60.0070.05517.30
5.6.50.0070.05917.37
5.6.40.0080.04817.30
5.6.30.0050.05217.28
5.6.20.0030.05717.33
5.6.10.0080.05317.35
5.6.00.0030.03917.36
5.5.380.0050.05917.57
5.5.370.0110.05317.38
5.5.360.0070.06017.36
5.5.350.0080.05317.43
5.5.340.0070.05517.42
5.5.330.0100.05517.75
5.5.320.0050.05617.57
5.5.310.0050.04617.52
5.5.300.0100.05117.45
5.5.290.0050.05117.45
5.5.280.0030.06117.50
5.5.270.0030.06417.39
5.5.260.0050.05517.45
5.5.250.0070.04817.39
5.5.240.0110.03117.31
5.5.230.0020.04317.16
5.5.220.0080.04117.21
5.5.210.0050.05217.29
5.5.200.0060.05417.41
5.5.190.0100.03716.96
5.5.180.0100.04917.24
5.5.170.0090.01914.32
5.5.160.0080.05017.19
5.5.150.0070.03717.38
5.5.140.0040.03917.29
5.5.130.0080.05317.14
5.5.120.0030.05617.20
5.5.110.0070.05517.19
5.5.100.0120.03817.23
5.5.90.0120.05117.07
5.5.80.0050.05817.27
5.5.70.0080.05517.12
5.5.60.0070.03517.18
5.5.50.0100.05116.90
5.5.40.0070.05517.19
5.5.30.0100.03117.29
5.5.20.0050.05917.11
5.5.10.0050.05217.14
5.5.00.0050.04217.19
5.4.450.0030.04315.25
5.4.440.0020.04815.24
5.4.430.0030.05515.17
5.4.420.0120.04715.13
5.4.410.0080.05315.01
5.4.400.0070.03714.97
5.4.390.0050.05914.84
5.4.380.0070.04715.08
5.4.370.0080.04714.98
5.4.360.0080.05714.83
5.4.350.0120.05314.77
5.4.340.0100.03614.89
5.4.330.0030.02510.96
5.4.320.0050.05514.99
5.4.310.0050.04315.08
5.4.300.0100.03314.79
5.4.290.0070.04114.97
5.4.280.0070.05315.03
5.4.270.0100.04614.94
5.4.260.0100.05314.88
5.4.250.0050.05215.06
5.4.240.0080.05215.06
5.4.230.0050.05615.02
5.4.220.0120.04915.04
5.4.210.0070.05214.94
5.4.200.0050.03914.90
5.4.190.0070.05714.94
5.4.180.0050.05615.02
5.4.170.0050.03715.02
5.4.160.0080.05314.90
5.4.150.0050.05514.75
5.4.140.0030.04213.76
5.4.130.0070.03413.62
5.4.120.0030.04213.46
5.4.110.0080.03513.77
5.4.100.0100.04413.72
5.4.90.0050.04013.55
5.4.80.0030.04113.67
5.4.70.0100.04813.65
5.4.60.0030.05213.68
5.4.50.0100.04413.72
5.4.40.0030.04713.69
5.4.30.0070.04813.66
5.4.20.0080.05013.59
5.4.10.0080.05013.52
5.4.00.0050.04313.25
5.3.290.0080.05512.63
5.3.280.0080.05112.46
5.3.270.0120.04712.51
5.3.260.0030.05312.49
5.3.250.0080.03812.51
5.3.240.0000.06012.43
5.3.230.0050.05512.46
5.3.220.0030.05312.53
5.3.210.0060.05412.46
5.3.200.0100.03112.38
5.3.190.0000.05812.49
5.3.180.0030.05612.54
5.3.170.0050.05112.57
5.3.160.0030.05412.54
5.3.150.0030.05412.53
5.3.140.0050.05612.44
5.3.130.0030.05712.51
5.3.120.0030.04512.39
5.3.110.0050.04312.49
5.3.100.0030.05512.14
5.3.90.0050.05312.24
5.3.80.0070.04312.16
5.3.70.0040.05412.18
5.3.60.0050.05012.13
5.3.50.0030.03711.96
5.3.40.0050.05012.12
5.3.30.0030.03712.19
5.3.20.0030.03311.93
5.3.10.0050.04711.93
5.3.00.0020.03311.87
5.2.170.0030.07311.09
5.2.160.0030.06311.16
5.2.150.0070.07711.12
5.2.140.0030.05011.18
5.2.130.0100.06010.91
5.2.120.0170.05711.05
5.2.110.0030.04311.14
5.2.100.0130.07311.02
5.2.90.0070.06311.10
5.2.80.0070.07010.92
5.2.70.0070.06310.94
5.2.60.0070.07311.00
5.2.50.0100.06710.85
5.2.40.0000.04310.86
5.2.30.0030.06710.77
5.2.20.0130.06710.95
5.2.10.0030.07710.80
5.2.00.0030.06710.68
5.1.60.0070.06310.11
5.1.50.0070.06010.00
5.1.40.0000.0579.88
5.1.30.0030.05310.39
5.1.20.0030.04710.47
5.1.10.0100.05710.19
5.1.00.0000.04010.16
5.0.50.0070.0708.66
5.0.40.0000.0838.46
5.0.30.0000.0778.24
5.0.20.0000.0778.14
5.0.10.0030.0408.24
5.0.00.0000.0808.25
4.4.90.0030.0638.09
4.4.80.0030.0408.09
4.4.70.0030.0638.09
4.4.60.0000.0578.09
4.4.50.0030.0778.09
4.4.40.0000.0908.09
4.4.30.0030.0738.09
4.4.20.0000.0508.09
4.4.10.0030.0608.09
4.4.00.0000.0508.09
4.3.110.0000.0738.09
4.3.100.0000.0738.09
4.3.90.0000.0678.09
4.3.80.0030.0738.09
4.3.70.0000.0438.09
4.3.60.0070.0678.09
4.3.50.0030.0578.09
4.3.40.0030.0838.09
4.3.30.0030.0638.09
4.3.20.0000.0638.09
4.3.10.0000.0678.09
4.3.00.0030.0638.09

preferences:
35.2 ms | 401 KiB | 5 Q