3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-type: text/plain'); $b = hash('sha256', mt_rand(), true); $s = microtime(true); for ($i = 0; $i < 100000; $i++) $r = hash('crc32', $b); var_dump($r, microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 100000; $i++) $r = hash('crc32b', $b); var_dump($r, microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 100000; $i++) $r = hash('sha1', $b); var_dump($r, microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 100000; $i++) $r = sha1($b); var_dump($r, microtime(true) - $s);

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.00.0070.20314.84
7.3.120.0000.14314.83
7.3.110.0030.12614.75
7.3.100.0030.12914.71
7.3.90.0100.11914.82
7.3.80.0070.11814.72
7.3.70.0030.12014.88
7.3.60.0100.11614.92
7.3.50.0030.12514.93
7.3.40.0030.11514.79
7.3.30.0100.11314.84
7.3.20.0130.11216.61
7.3.10.0030.14216.75
7.3.00.0100.11116.52
7.2.250.0070.22915.20
7.2.240.0060.14015.15
7.2.230.0070.19414.91
7.2.220.0100.12915.09
7.2.210.0030.15415.21
7.2.200.0070.12714.91
7.2.190.0070.11714.93
7.2.180.0100.11915.03
7.2.170.0030.12415.13
7.2.00.0030.11419.31
7.1.330.0070.14615.53
7.1.320.0070.15315.61
7.1.310.0030.16815.63
7.1.300.0100.14615.85
7.1.290.0070.16715.57
7.1.280.0030.18915.76
7.1.270.0030.16215.98
7.1.260.0070.15115.83
7.1.70.0030.14117.10
7.1.60.0070.14219.40
7.1.50.0030.15517.01
7.1.00.0070.17722.48
7.0.200.0000.13016.63
7.0.140.0000.20721.98
7.0.80.0330.18719.94
7.0.70.0500.17720.05
7.0.60.0430.18319.96
7.0.50.0530.19020.30
7.0.40.0130.21320.13
7.0.30.0130.25720.13
7.0.20.0030.20020.04
7.0.10.0100.18019.95
7.0.00.0100.14020.12
5.6.280.0130.23720.82
5.6.230.0330.16720.59
5.6.220.0130.23020.56
5.6.210.0130.16020.68
5.6.200.0070.20321.04
5.6.190.0030.18021.18
5.6.180.0100.17021.18
5.6.170.0100.22721.06
5.6.160.0100.25020.94
5.6.150.0130.24321.11
5.6.140.0100.24321.04
5.6.130.0030.19721.07
5.6.120.0070.22021.17
5.6.110.0100.23721.07
5.6.100.0070.20720.96
5.6.90.0000.19320.94
5.6.80.0070.23020.52
5.6.70.0070.21720.49
5.6.60.0270.21320.45
5.6.50.0130.20320.50
5.6.40.0070.24320.42
5.6.30.0070.22020.49
5.6.20.0130.18320.36
5.6.10.0100.24720.40
5.6.00.0130.23720.46
5.5.370.0130.24020.39
5.5.360.0030.21720.45
5.5.350.0130.20020.43
5.5.340.0030.17320.80
5.5.330.0170.25020.84
5.5.320.0030.23320.89
5.5.310.0030.21720.77
5.5.300.0100.17320.76
5.5.290.0130.24720.90
5.5.280.0070.23020.64
5.5.270.0100.23320.88
5.5.260.0030.19320.88
5.5.250.0100.24020.58
5.5.240.0000.25320.26
5.5.230.0100.21020.18
5.5.220.0170.21320.18
5.5.210.0070.22720.16
5.5.200.0170.23020.15
5.5.190.0070.22320.15
5.5.180.0100.21720.16
5.5.160.0030.23320.24
5.5.150.0100.20320.13
5.5.140.0070.23320.21
5.5.130.0030.19720.13
5.5.120.0100.18020.18
5.5.110.0030.21020.15
5.5.100.0100.21019.96
5.5.90.0070.19719.94
5.5.80.0070.17020.07
5.5.70.0100.24320.12
5.5.60.0170.20320.16
5.5.50.0070.22720.15
5.5.40.0070.25020.14
5.5.30.0230.22020.05
5.5.20.0070.22020.08
5.5.10.0030.23020.02
5.5.00.0030.20320.10
5.4.450.0200.21719.30
5.4.440.0130.21719.11
5.4.430.0170.20019.39
5.4.420.0030.19319.44
5.4.410.0070.20719.32
5.4.400.0030.22019.23
5.4.390.0000.18318.80
5.4.380.0000.23719.10
5.4.370.0100.23719.07
5.4.360.0000.17019.02
5.4.350.0000.21319.23
5.4.340.0100.20719.06
5.4.320.0130.21318.79
5.4.310.0130.21318.95
5.4.300.0070.19018.92
5.4.290.0000.18319.11
5.4.280.0230.21318.94
5.4.270.0100.19319.04
5.4.260.0130.21719.12
5.4.250.0130.23319.02
5.4.240.0200.20019.04
5.4.230.0100.22318.97
5.4.220.0100.21718.78
5.4.210.0100.21318.97
5.4.200.0030.20019.22
5.4.190.0070.16719.04
5.4.180.0070.21019.09
5.4.170.0070.22718.88
5.4.160.0070.21719.02
5.4.150.0070.22719.21
5.4.140.0070.24316.29
5.4.130.0100.24716.38
5.4.120.0100.22016.33
5.4.110.0070.18716.44
5.4.100.0030.17016.21
5.4.90.0070.16716.38
5.4.80.0070.20316.20
5.4.70.0000.16316.24
5.4.60.0070.14716.29
5.4.50.0070.16316.30
5.4.40.0070.16016.38
5.4.30.0100.19316.27
5.4.20.0130.14016.20
5.4.10.0030.14316.39
5.4.00.0030.16315.79
5.3.290.0070.24314.66
5.3.280.0130.25714.61
5.3.270.0100.25314.47
5.3.260.0170.25014.59
5.3.250.0070.27014.46
5.3.240.0030.27714.61
5.3.230.0030.26014.57
5.3.220.0100.26714.52
5.3.210.0100.24714.57
5.3.200.0070.24014.58
5.3.190.0000.19014.54
5.3.180.0030.19314.42
5.3.170.0070.18314.43
5.3.160.0030.15314.52
5.3.150.0030.18714.52
5.3.140.0070.18714.53
5.3.130.0000.15314.55
5.3.120.0070.17714.40
5.3.110.0030.16014.50
5.3.100.0030.19014.00
5.3.90.0000.15713.94
5.3.80.0030.19013.94
5.3.70.0000.15714.01
5.3.60.0000.19313.97
5.3.50.0030.15013.73
5.3.40.0000.18013.95
5.3.30.0070.24713.91
5.3.20.0100.23713.52
5.3.10.0070.25313.63
5.3.00.0100.23713.61
5.2.170.0000.19311.66
5.2.160.0070.16711.66
5.2.150.0030.17311.66
5.2.140.0100.20711.66
5.2.130.0100.21011.66
5.2.120.0070.21711.66
5.2.110.0070.22711.66
5.2.100.0000.25711.66
5.2.90.0030.21311.66
5.2.80.0000.24711.66
5.2.70.0030.19011.66
5.2.60.0030.25311.66
5.2.50.0030.27311.66
5.2.40.0000.23311.66
5.2.30.0130.23011.66
5.2.20.0070.39011.66
5.2.10.0030.38711.66
5.2.00.0070.40711.66
5.1.60.0100.41011.66
5.1.50.0000.44011.66
5.1.40.0030.38311.66
5.1.30.0000.39011.66
5.1.20.0100.41711.66
5.1.10.0030.05011.66
5.1.00.0030.06711.66
5.0.50.0000.04311.66
5.0.40.0030.03311.66
5.0.30.0070.06011.66
5.0.20.0030.02011.66
5.0.10.0030.04011.66
5.0.00.0000.07011.66
4.4.90.0000.03711.66
4.4.80.0070.02311.66
4.4.70.0000.01711.66
4.4.60.0000.03711.66
4.4.50.0000.02311.66
4.4.40.0000.05311.66
4.4.30.0000.03711.66
4.4.20.0070.03011.66
4.4.10.0030.03711.66
4.4.00.0000.06011.66
4.3.110.0000.03711.66
4.3.100.0030.02011.66
4.3.90.0000.03711.66
4.3.80.0030.03311.66
4.3.70.0000.03711.66
4.3.60.0100.02311.66
4.3.50.0070.02011.66
4.3.40.0030.03311.66
4.3.30.0000.02011.66
4.3.20.0030.02011.66
4.3.10.0000.03711.66
4.3.00.0030.03011.66

preferences:
39.68 ms | 400 KiB | 5 Q