3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $m1 = str_repeat("\x80", 32); $m2 = str_repeat("\x80", 33554432); $end1 = $end2 = $start = microtime(true); $hash1 = hash('sha256', $m1); $end1 = microtime(true); $hash2 = hash('sha256', $m2); $end2 = microtime(true); var_dump( number_format($end1 - $start, 5), number_format($end2 - $start, 5) );
based on QKIKg
Output for 7.0.1
string(7) "0.00003" string(7) "0.26532"
Output for 7.0.0
string(7) "0.00003" string(7) "0.35157"
Output for hhvm-3.10.1
string(7) "0.00003" string(7) "0.28883"
Output for 5.6.16
string(7) "0.00001" string(7) "0.36637"
Output for 5.6.15
string(7) "0.00001" string(7) "0.33906"
Output for 5.6.14
string(7) "0.00001" string(7) "0.28858"
Output for 5.6.13
string(7) "0.00001" string(7) "0.39209"
Output for 5.6.12
string(7) "0.00001" string(7) "0.37258"
Output for 5.6.11
string(7) "0.00001" string(7) "0.32926"
Output for 5.6.10
string(7) "0.00001" string(7) "0.38085"
Output for 5.6.9
string(7) "0.00001" string(7) "0.36680"
Output for 5.6.8
string(7) "0.00001" string(7) "0.33088"
Output for 5.6.7
string(7) "0.00001" string(7) "0.30956"
Output for 5.6.6
string(7) "0.00001" string(7) "0.31269"
Output for 5.6.5
string(7) "0.00001" string(7) "0.29748"
Output for 5.6.4
string(7) "0.00001" string(7) "0.25898"
Output for 5.6.3
string(7) "0.00001" string(7) "0.30169"
Output for 5.6.2
string(7) "0.00001" string(7) "0.34144"
Output for 5.6.1
string(7) "0.00001" string(7) "0.24293"
Output for 5.6.0
string(7) "0.00001" string(7) "0.30967"
Output for 5.5.30
string(7) "0.00001" string(7) "0.27426"
Output for 5.5.29
string(7) "0.00001" string(7) "0.28753"
Output for 5.5.28
string(7) "0.00001" string(7) "0.26777"
Output for 5.5.27
string(7) "0.00001" string(7) "0.27610"
Output for 5.5.26
string(7) "0.00001" string(7) "0.24954"
Output for 5.5.25
string(7) "0.00001" string(7) "0.26936"
Output for 5.5.24
string(7) "0.00001" string(7) "0.31922"
Output for 5.5.23
string(7) "0.00001" string(7) "0.27257"
Output for 5.5.22
string(7) "0.00001" string(7) "0.27117"
Output for 5.5.21
string(7) "0.00001" string(7) "0.31528"
Output for 5.5.20
string(7) "0.00001" string(7) "0.32034"
Output for 5.5.19
string(7) "0.00001" string(7) "0.24977"
Output for 5.5.18
string(7) "0.00001" string(7) "0.25739"
Output for 5.5.17
string(7) "0.00001" string(7) "0.26629"
Output for 5.5.16
string(7) "0.00001" string(7) "0.26616"
Output for 5.5.15
string(7) "0.00001" string(7) "0.24449"
Output for 5.5.14
string(7) "0.00001" string(7) "0.25675"
Output for 5.5.13
string(7) "0.00001" string(7) "0.29276"
Output for 5.5.12
string(7) "0.00001" string(7) "0.30034"
Output for 5.5.11
string(7) "0.00001" string(7) "0.24445"
Output for 5.5.10
string(7) "0.00001" string(7) "0.28341"
Output for 5.5.9
string(7) "0.00005" string(7) "0.27130"
Output for 5.5.8
string(7) "0.00001" string(7) "0.39843"
Output for 5.5.7
string(7) "0.00001" string(7) "0.25345"
Output for 5.5.6
string(7) "0.00001" string(7) "0.29697"
Output for 5.5.5
string(7) "0.00001" string(7) "0.35673"
Output for 5.5.4
string(7) "0.00001" string(7) "0.31636"
Output for 5.5.3
string(7) "0.00001" string(7) "0.44367"
Output for 5.5.2
string(7) "0.00001" string(7) "0.27202"
Output for 5.5.1
string(7) "0.00001" string(7) "0.35372"
Output for 5.5.0
string(7) "0.00002" string(7) "0.35825"