3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'a'; $start_time = microtime(true); for($i = 0; $i <= 1000000; $i++){ +$a; } echo '<br/>', microtime(true) - $start_time; $start_time1 = microtime(true); for($i = 0; $i <= 1000000; $i++){ (int)$a; } echo '<br/>', microtime(true) - $start_time1;

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.0090.00914.89
7.4.00.0060.01214.70
7.3.130.0150.00414.75
7.3.120.0190.00014.95
7.3.110.0030.01614.78
7.3.100.0110.00714.86
7.3.90.0090.00914.93
7.3.80.0060.01014.92
7.3.70.0050.01014.70
7.3.60.0060.00914.84
7.3.50.0000.00914.65
7.3.40.0030.01014.59
7.3.30.0030.01014.51
7.3.20.0000.01416.66
7.3.10.0070.00416.36
7.3.00.0060.00616.79
7.2.260.0060.01214.72
7.2.250.0070.01114.97
7.2.240.0040.01114.85
7.2.230.0030.01714.80
7.2.220.0040.01515.17
7.2.210.0030.00914.96
7.2.200.0090.00914.88
7.2.190.0000.01214.60
7.2.180.0060.00614.90
7.2.170.0000.01714.71
7.2.160.0030.01014.81
7.2.150.0060.00916.80
7.2.140.0030.01016.93
7.2.130.0100.00316.77
7.2.120.0040.00716.94
7.2.110.0000.01316.91
7.2.100.0000.01516.64
7.2.90.0070.01116.91
7.2.80.0030.00617.02
7.2.70.0090.00616.58
7.2.60.0000.01216.89
7.2.50.0100.00316.84
7.2.40.0100.00716.91
7.2.30.0000.01116.99
7.2.20.0070.00416.98
7.2.10.0040.00816.90
7.2.00.0070.00817.91
7.1.330.0070.00715.41
7.1.320.0030.00715.45
7.1.310.0070.00715.89
7.1.300.0070.00715.80
7.1.290.0070.00715.76
7.1.280.0000.00815.76
7.1.270.0000.01315.73
7.1.260.0000.01215.77
7.1.250.0040.00815.54
7.1.240.0100.00315.88
7.1.230.0050.00515.82
7.1.220.0060.00315.73
7.1.210.0140.00315.70
7.1.200.0030.01015.70
7.1.190.0030.00715.79
7.1.180.0050.00315.79
7.1.170.0000.00915.45
7.1.160.0070.00415.73
7.1.150.0000.01115.63
7.1.140.0070.00315.84
7.1.130.0030.00615.71
7.1.120.0030.00615.62
7.1.110.0040.00415.51
7.1.100.0060.00915.73
7.1.90.0000.01315.70
7.1.80.0090.00315.65
7.1.70.0080.00316.31
7.1.60.0090.00817.61
7.1.50.0050.01016.56
7.1.40.0070.00315.75
7.1.30.0080.00015.55
7.1.20.0100.00315.64
7.1.10.0070.01015.80
7.1.00.0020.04618.97
7.0.330.0000.12915.35
7.0.320.0070.12715.40
7.0.310.0000.13815.23
7.0.300.0070.11215.41
7.0.290.0030.12815.61
7.0.280.0100.11915.48
7.0.270.0000.12115.00
7.0.260.0030.13315.48
7.0.250.0000.15215.57
7.0.240.0030.14015.60
7.0.230.0000.12615.42
7.0.220.0100.12215.48
7.0.210.0030.14115.33
7.0.200.0150.09216.03
7.0.190.0030.13015.50
7.0.180.0030.12715.46
7.0.170.0030.12115.54
7.0.160.0070.11615.55
7.0.150.0070.12415.16
7.0.140.0080.12418.67
7.0.130.0100.14215.15
7.0.120.0070.11915.09
7.0.110.0070.12315.51
7.0.100.0030.12315.07
7.0.90.0030.11615.34
7.0.80.0100.12415.50
7.0.70.0030.12515.52
7.0.60.0070.12817.72
7.0.50.0020.10816.67
7.0.40.0020.11216.75
7.0.30.0220.12316.84
7.0.20.0170.14116.75
7.0.10.0050.10216.86
7.0.00.0050.12916.64
5.6.400.0030.23314.63
5.6.390.0070.24714.36
5.6.380.0030.22314.46
5.6.370.0070.23714.66
5.6.360.0070.24814.40
5.6.350.0070.22414.45
5.6.340.0030.24214.53
5.6.330.0130.21814.61
5.6.320.0030.22814.53
5.6.310.0030.23814.31
5.6.300.0070.22414.23
5.6.290.0030.24314.57
5.6.280.0050.24717.81
5.6.270.0070.27114.32
5.6.260.0000.27214.23
5.6.250.0100.22014.23
5.6.240.0100.23414.37
5.6.230.0000.23014.14
5.6.220.0030.25014.34
5.6.210.0070.17917.46
5.6.200.0080.17616.19
5.6.190.0030.21517.45
5.6.180.0250.19517.46
5.6.170.0150.19917.29
5.6.160.0100.19017.31
5.6.150.0080.21716.24
5.6.140.0110.19016.38
5.6.130.0050.19816.27
5.6.120.0070.20717.54
5.6.110.0080.18917.72
5.6.100.0130.22817.57
5.6.90.0100.20817.67
5.6.80.0080.19617.43
5.6.70.0030.22714.37
5.6.60.0000.27014.00
5.6.50.0070.25314.23
5.6.40.0000.25014.11
5.6.30.0070.23614.24
5.6.20.0130.24114.20
5.6.10.0030.22814.32
5.6.00.0030.26214.19
5.5.380.0070.27014.27
5.5.370.0030.25514.28
5.5.360.0030.24913.94
5.5.350.0100.20517.36
5.5.340.0020.20916.15
5.5.330.0100.21417.42
5.5.320.0020.21317.18
5.5.310.0180.19917.19
5.5.300.0050.20416.04
5.5.290.0070.21316.21
5.5.280.0030.19617.45
5.5.270.0030.22417.60
5.5.260.0050.22717.59
5.5.250.0020.24317.29
5.5.240.0070.21217.06
5.5.230.0100.26114.19
5.5.220.0000.22114.24
5.5.210.0030.24414.39
5.5.200.0000.24213.94
5.5.190.0030.26314.59
5.5.180.0030.24713.91
5.5.170.0100.25914.40
5.5.160.0000.23514.08
5.5.150.0070.24714.48
5.5.140.0220.24114.07
5.5.130.0030.22414.11
5.5.120.0000.24514.25
5.5.110.0030.23514.02
5.5.100.0030.23913.91
5.5.90.0030.23014.43
5.5.80.0030.22614.08
5.5.70.0030.26914.39
5.5.60.0100.22614.07
5.5.50.0030.21214.07
5.5.40.0070.23114.03
5.5.30.0000.28614.16
5.5.20.0030.23214.07
5.5.10.0070.27014.31
5.5.00.0070.26413.99
5.4.450.0050.22516.07
5.4.440.0470.24916.18
5.4.430.0470.22616.10
5.4.420.1150.13716.07
5.4.410.1150.12516.14
5.4.400.1200.11315.94
5.4.390.1130.12015.94
5.4.380.0120.25415.66
5.4.370.0530.26115.67
5.4.360.0170.23015.64
5.4.350.0170.23715.72
5.4.340.0220.27915.73
5.4.330.0000.23812.72
5.4.320.0120.20412.59
5.4.310.0050.20212.59
5.4.300.0050.21012.59
5.4.290.0030.20112.59
5.4.280.0020.22412.54
5.4.270.0040.22312.54
5.4.260.0020.19312.53
5.4.250.0070.19712.54
5.4.240.0050.21912.54
5.4.230.0050.21112.53
5.4.220.0050.18712.53
5.4.210.0040.19212.53
5.4.200.0040.20512.53
5.4.190.0070.18712.53
5.4.180.0090.21312.53
5.4.170.0100.20112.54
5.4.160.0090.18912.53
5.4.150.0040.19412.53
5.4.140.0020.21112.37
5.4.130.0080.23112.37
5.4.120.0100.19312.34
5.4.110.0040.23112.34
5.4.100.0060.21812.34
5.4.90.0040.21912.34
5.4.80.0050.21112.34
5.4.70.0050.21312.34
5.4.60.0070.19912.34
5.4.50.0070.21612.34
5.4.40.0030.21912.33
5.4.30.0060.21312.33
5.4.20.0070.18512.33
5.4.10.0050.19712.34
5.4.00.0050.20812.08
5.3.290.0050.18612.80
5.3.280.0080.19312.71
5.3.270.0080.19112.72
5.3.260.0040.18312.72
5.3.250.0090.18312.72
5.3.240.0060.18812.72
5.3.230.0050.19912.71
5.3.220.0070.18012.68
5.3.210.0090.19512.68
5.3.200.0030.19312.68
5.3.190.0170.19112.68
5.3.180.0090.20912.67
5.3.170.0060.19212.67
5.3.160.0090.20012.67
5.3.150.0050.19612.68
5.3.140.0080.20612.66
5.3.130.0020.20012.66
5.3.120.0090.18612.66
5.3.110.0050.18612.66
5.3.100.0030.19012.12
5.3.90.0040.18612.09
5.3.80.0100.18012.08
5.3.70.0050.18712.08
5.3.60.0050.18612.06
5.3.50.0080.21512.00
5.3.40.0060.18412.00
5.3.30.0050.19511.95
5.3.20.0080.19011.72
5.3.10.0080.19111.69
5.3.00.0040.19211.68
5.2.170.0120.2219.18
5.2.160.0030.2069.18
5.2.150.0060.2269.18
5.2.140.0030.2389.18
5.2.130.0060.2199.14
5.2.120.0040.2459.14
5.2.110.0040.2249.15
5.2.100.0050.2209.14
5.2.90.0060.2309.14
5.2.80.0070.2189.14
5.2.70.0060.2219.14
5.2.60.0050.2169.09
5.2.50.0070.2119.06
5.2.40.0050.2139.04
5.2.30.0060.2389.01
5.2.20.0080.2139.00
5.2.10.0250.1868.95
5.2.00.0290.2138.81
5.1.60.0030.2428.10
5.1.50.0030.2328.09
5.1.40.0050.2528.08
5.1.30.0020.2418.43
5.1.20.0050.2388.45
5.1.10.0070.2378.18
5.1.00.0110.2318.17
5.0.50.0260.4166.65
5.0.40.0220.4196.51
5.0.30.0190.4246.32
5.0.20.0280.4066.29
5.0.10.0120.4426.27
5.0.00.0080.4706.27
4.4.90.0110.4584.78
4.4.80.0030.4264.75
4.4.70.0030.4294.76
4.4.60.0050.4524.76
4.4.50.0020.4264.77
4.4.40.0040.4394.71
4.4.30.0030.4314.76
4.4.20.0060.4434.85
4.4.10.0080.4324.85
4.4.00.0020.4394.76
4.3.110.0020.4324.67
4.3.100.0070.4354.67
4.3.90.0010.4644.64
4.3.80.0020.4294.58
4.3.70.0070.4264.63
4.3.60.0010.4384.63
4.3.50.0040.4514.63
4.3.40.0040.4364.53
4.3.30.0030.4553.33
4.3.20.0000.4313.31
4.3.10.0030.4173.27
4.3.00.0000.33015.62

preferences:
36.83 ms | 401 KiB | 5 Q