3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for ($i = 0; $i < 1000000; $i ++) { $random = (string)mt_rand(); $int = intval($random); } $end = microtime(true) - $start; echo $end.PHP_EOL; $start = microtime(true); for ($i = 0; $i < 1000000; $i ++) { $random = (string)mt_rand(); $int = (int)$random; } $end = microtime(true) - $start; echo $end.PHP_EOL;

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.0100.27814.61
7.4.00.0100.24014.59
7.3.130.0100.39814.76
7.3.120.0030.43814.52
7.3.110.0100.42014.79
7.3.100.0070.24014.86
7.3.90.0070.30414.38
7.3.80.0130.23514.81
7.3.70.0030.31414.74
7.3.60.0030.24314.73
7.3.50.0000.35514.62
7.3.40.0070.28314.74
7.3.30.0070.33914.73
7.3.20.0030.41016.40
7.3.10.0120.25816.30
7.3.00.0080.27816.44
7.2.260.0070.43814.91
7.2.250.0130.31814.60
7.2.240.0070.40514.99
7.2.230.0130.36115.14
7.2.220.0070.24815.02
7.2.210.0100.25114.79
7.2.200.0030.25314.59
7.2.190.0030.39114.88
7.2.180.0030.33714.61
7.2.170.0000.29714.86
7.2.160.0030.42014.75
7.2.150.0070.39317.07
7.2.140.0100.29316.79
7.2.130.0130.29116.54
7.2.120.0130.36516.45
7.2.110.0130.25316.54
7.2.100.0150.27816.47
7.2.90.0210.33116.77
7.2.80.0050.35516.51
7.2.70.0080.31316.30
7.2.60.0120.30616.67
7.2.50.0110.28616.65
7.2.40.0100.27016.79
7.2.30.0080.35116.23
7.2.20.0180.25016.62
7.2.10.0120.30516.70
7.2.00.0070.31517.60
7.1.330.0070.36515.52
7.1.320.0030.43815.60
7.1.310.0000.38716.03
7.1.300.0070.41115.66
7.1.290.0100.41215.53
7.1.280.0030.43415.77
7.1.270.0070.48515.66
7.1.260.0070.37515.88
7.1.250.0080.38115.57
7.1.240.0100.46115.92
7.1.230.0030.46215.29
7.1.220.0000.47415.64
7.1.210.0070.43815.54
7.1.200.0070.49815.62
7.1.190.0030.42415.54
7.1.180.0000.37015.52
7.1.170.0070.38515.78
7.1.160.0100.48015.48
7.1.150.0000.36515.99
7.1.140.0070.43915.86
7.1.130.0030.41915.44
7.1.120.0100.35015.41
7.1.110.0000.53615.46
7.1.100.0070.36215.72
7.1.90.0030.46815.70
7.1.80.0070.38215.95
7.1.70.0050.31016.46
7.1.60.0080.31317.52
7.1.50.0070.29216.12
7.1.40.0030.34315.63
7.1.30.0030.34915.30
7.1.20.0030.33515.45
7.1.10.0070.42315.62
7.1.00.0070.41319.00
7.0.330.0030.53715.36
7.0.320.0070.52415.14
7.0.310.0030.53215.20
7.0.300.0070.59715.34
7.0.290.0030.61215.50
7.0.280.0070.49215.20
7.0.270.0030.50215.64
7.0.260.0030.47215.54
7.0.250.0100.53815.46
7.0.240.0070.53915.31
7.0.230.0030.45115.23
7.0.220.0000.46915.61
7.0.210.0000.57115.23
7.0.200.0120.42115.10
7.0.190.0000.58015.09
7.0.180.0070.46815.60
7.0.170.0030.46015.32
7.0.160.0100.49115.25
7.0.150.0030.45915.09
7.0.140.0030.40218.58
7.0.130.0000.60915.43
7.0.120.0100.47015.49
7.0.110.0100.58915.52
7.0.100.0070.46214.92
7.0.90.0030.51114.93
7.0.80.0030.50715.25
7.0.70.0000.52315.59
7.0.60.0050.38417.58
7.0.50.0020.46716.64
7.0.40.0080.35016.75
7.0.30.0270.36916.90
7.0.20.0130.45716.85
7.0.10.0220.48116.73
7.0.00.0030.48416.66
5.6.400.0100.91814.16
5.6.390.0090.88113.88
5.6.380.0030.93714.33
5.6.370.0100.87414.57
5.6.360.0001.00114.25
5.6.350.0101.05614.61
5.6.340.0070.89414.34
5.6.330.0031.02714.51
5.6.320.0070.92214.77
5.6.310.0030.95014.16
5.6.300.0070.90114.19
5.6.290.0031.14314.00
5.6.280.0050.97817.45
5.6.270.0031.02914.25
5.6.260.0070.99314.19
5.6.250.0031.01814.14
5.6.240.0001.13814.34
5.6.230.0001.00314.19
5.6.220.0031.11214.16
5.6.210.0050.75717.18
5.6.200.0070.85716.18
5.6.190.0030.71617.32
5.6.180.0170.81017.27
5.6.170.0220.83517.35
5.6.160.0030.85117.33
5.6.150.0050.83016.11
5.6.140.0080.77216.17
5.6.130.0100.69216.21
5.6.120.0080.84517.74
5.6.110.0070.83817.59
5.6.100.0030.84117.60
5.6.90.0070.86517.60
5.6.80.0030.84717.13
5.6.70.2070.73317.16
5.6.60.0031.09414.37
5.6.50.0031.11613.89
5.6.40.0100.84914.02
5.6.30.0030.93614.34
5.6.20.0030.85814.15
5.6.10.0030.92814.39
5.6.00.0060.93014.16
5.5.380.0070.94814.10
5.5.370.0031.20214.22
5.5.360.0071.08914.29
5.5.350.0050.72817.38
5.5.340.0020.78016.02
5.5.330.0070.76517.36
5.5.320.0220.81617.37
5.5.310.0170.77217.11
5.5.300.0030.85916.26
5.5.290.0030.86316.15
5.5.280.0080.77917.42
5.5.270.0030.85117.48
5.5.260.0070.72117.51
5.5.250.0080.81417.42
5.5.240.0100.88317.16
5.5.230.0030.94114.25
5.5.220.0001.19314.05
5.5.210.0031.13513.96
5.5.200.0101.12214.23
5.5.190.0070.98014.02
5.5.180.0021.17914.21
5.5.170.0071.10014.08
5.5.160.0071.13614.34
5.5.150.0131.06114.05
5.5.140.0031.22814.05
5.5.130.0031.12814.02
5.5.120.0070.86414.06
5.5.110.0001.01913.87
5.5.100.0031.16713.96
5.5.90.0130.86014.26
5.5.80.0070.90814.07
5.5.70.0071.12614.11
5.5.60.0071.08313.92
5.5.50.0000.88513.62
5.5.40.0101.04514.09
5.5.30.0101.17514.37
5.5.20.0071.19014.16
5.5.10.0031.20814.04
5.5.00.0031.18213.82
5.4.450.0450.91815.04
5.4.440.0070.83415.10
5.4.430.0100.86815.15
5.4.420.0130.86115.25
5.4.410.0120.83515.03
5.4.400.0180.92015.09
5.4.390.0120.74515.05
5.4.380.0220.98714.75
5.4.370.0220.97714.68
5.4.360.0181.01314.56
5.4.350.0150.99714.83
5.4.340.0130.97214.84
5.4.330.0030.92510.89
5.4.320.0090.91511.62
5.4.310.0100.91311.78
5.4.300.0040.87211.76
5.4.290.0060.84011.55
5.4.280.0080.86411.74
5.4.270.0050.84711.54
5.4.260.0070.88811.69
5.4.250.0060.93711.74
5.4.240.0080.93311.61
5.4.230.0070.86811.62
5.4.220.0050.87511.56
5.4.210.0050.81711.67
5.4.200.0060.92811.69
5.4.190.0070.80911.58
5.4.180.0100.78311.47
5.4.170.0030.76511.65
5.4.160.0060.88511.61
5.4.150.0060.83711.63
5.4.140.0060.81311.42
5.4.130.0040.74611.38
5.4.120.0040.95111.46
5.4.110.0060.93711.58
5.4.100.0050.84311.30
5.4.90.0050.84111.30
5.4.80.0050.88811.38
5.4.70.0040.88011.51
5.4.60.0080.76611.33
5.4.50.0040.75611.38
5.4.40.0060.80211.40
5.4.30.0060.72611.34
5.4.20.0060.74811.42
5.4.10.0040.76511.36
5.4.00.0060.80811.13
5.3.290.0070.69412.80
5.3.280.0060.73412.71
5.3.270.0050.66712.72
5.3.260.0090.65212.72
5.3.250.0110.71212.72
5.3.240.0120.73212.71
5.3.230.0060.73912.71
5.3.220.0110.67312.68
5.3.210.0090.67912.68
5.3.200.0080.66712.68
5.3.190.0110.66112.68
5.3.180.0090.65512.67
5.3.170.0120.68012.67
5.3.160.0100.65012.67
5.3.150.0100.68612.67
5.3.140.0090.75712.66
5.3.130.0100.66112.65
5.3.120.0100.68112.66
5.3.110.0140.66112.66
5.3.100.0090.68512.12
5.3.90.0050.67112.08
5.3.80.0050.67112.07
5.3.70.0080.66412.07
5.3.60.0090.77712.06
5.3.50.0230.70112.00
5.3.40.0150.79012.00
5.3.30.0130.66511.95
5.3.20.0090.71511.73
5.3.10.0130.64011.70
5.3.00.0090.69411.69
5.2.170.0050.8159.19
5.2.160.0080.7429.19
5.2.150.0070.7429.18
5.2.140.0040.8719.18
5.2.130.0070.7199.14
5.2.120.0060.7259.14
5.2.110.0030.7299.15
5.2.100.0060.7499.14
5.2.90.0090.7329.14
5.2.80.0080.7749.14
5.2.70.0070.7669.14
5.2.60.0100.7329.10
5.2.50.0060.7649.06
5.2.40.0030.7949.04
5.2.30.0060.7259.02
5.2.20.0110.7549.00
5.2.10.0060.8508.95
5.2.00.0060.8418.81
5.1.60.0040.8868.10
5.1.50.0070.8838.10
5.1.40.0081.0368.08
5.1.30.0081.0078.43
5.1.20.0030.9068.45
5.1.10.0050.8338.17
5.1.00.0130.9408.18
5.0.50.0121.4616.66
5.0.40.0111.6546.52
5.0.30.0101.6606.34
5.0.20.0101.6956.30
5.0.10.0091.5596.28
5.0.00.0071.3376.27
4.4.90.0041.2414.78
4.4.80.0111.2454.76
4.4.70.0101.2734.75
4.4.60.0071.3474.76
4.4.50.0111.3444.77
4.4.40.0071.2614.71
4.4.30.0051.2084.76
4.4.20.0051.2914.85
4.4.10.0101.3004.85
4.4.00.0341.3864.76
4.3.110.0041.3924.67
4.3.100.0091.4284.67
4.3.90.0081.2984.63
4.3.80.0061.2524.59
4.3.70.0031.3454.63
4.3.60.0051.3794.63
4.3.50.0041.2534.63
4.3.40.0101.3454.54
4.3.30.0021.2833.34
4.3.20.0121.9903.28
4.3.10.0041.9943.24
4.3.00.0001.53313.25

preferences:
40.63 ms | 401 KiB | 5 Q