3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function gen_secured_random() { // cause random is the way $a = rand(1337,2600)*42; $b = rand(1879,1955)*42; $a < $b ? $a ^= $b ^= $a ^= $b : $a = $b; return $a+$b; } function secured_hash_function($plain) { // cause md5 is the best hash ever $secured_plain = sanitize_user_input($plain); return md5($secured_plain); } function sanitize_user_input($input) { // cause someone told me to never trust user input $re = '/[^a-zA-Z0-9]/'; $secured_input = preg_replace($re, "", $input); return $secured_input; } $s = 's'; $h ='h'; print "s => "; var_dump($s); print "h => "; var_dump($h); if (isset($s) && isset($h )) { $s = sanitize_user_input($s); $h = secured_hash_function($h); $r = gen_secured_random(); echo "strans => " ; var_dump($s); echo "htrans => " ; var_dump($h); echo "rtrans => " ; var_dump($r); if($s != false && $h != false) { if($s.$r == $h) { print "Well done! Here is your flag: "; } else { print "Fail..."; } } else { print "<p>Hum ...</p>"; } } ?>
based on dg2BZ
Output for 7.2.2
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(142380) Fail...
Output for 7.2.1
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(144438) Fail...
Output for 5.6.29, 7.2.0
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(162540) Fail...
Output for 5.6.9, 5.6.11, 7.0.16, 7.1.14
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159180) Fail...
Output for 7.1.13
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160776) Fail...
Output for 7.1.12
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(138180) Fail...
Output for 7.0.27, 7.1.11
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161448) Fail...
Output for 7.1.10
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158676) Fail...
Output for 7.1.9
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(155442) Fail...
Output for 7.1.8
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(144396) Fail...
Output for 7.1.7
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160188) Fail...
Output for 7.1.6
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161784) Fail...
Output for 7.1.5
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159768) Fail...
Output for 7.1.4
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159600) Fail...
Output for 7.1.3
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(141666) Fail...
Output for 7.1.2
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158844) Fail...
Output for 5.6.23, 7.1.1
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160524) Fail...
Output for 7.1.0
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158088) Fail...
Output for 7.0.26
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158340) Fail...
Output for 7.0.25
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163296) Fail...
Output for 7.0.24
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(156786) Fail...
Output for 7.0.23
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(142296) Fail...
Output for 7.0.22
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163212) Fail...
Output for 7.0.21
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(164052) Fail...
Output for 7.0.20
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163380) Fail...
Output for 7.0.13, 7.0.19
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158592) Fail...
Output for 7.0.18
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161952) Fail...
Output for 7.0.17
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163716) Fail...
Output for 7.0.15
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160608) Fail...
Output for 5.6.21, 7.0.14
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161532) Fail...
Output for 7.0.12
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(153510) Fail...
Output for 7.0.11
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(156408) Fail...
Output for 7.0.10
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(154056) Fail...
Output for 7.0.9
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163884) Fail...
Output for 7.0.8
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(151914) Fail...
Output for 7.0.7
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161196) Fail...
Output for 7.0.6
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(142884) Fail...
Output for 7.0.5
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159684) Fail...
Output for 7.0.4
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(152166) Fail...
Output for 7.0.3
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(145236) Fail...
Output for 7.0.2
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(162120) Fail...
Output for 7.0.1
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159852) Fail...
Output for 7.0.0
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(151284) Fail...
Output for 5.6.6, hhvm-3.21.3 - 3.22.0
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161112) Fail...
Output for hhvm-3.18.5
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(144858) Fail...
Output for 5.6.30
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(156912) Fail...
Output for 5.6.28
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158004) Fail...
Output for 5.6.27
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163632) Fail...
Output for 5.6.26
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160860) Fail...
Output for 5.6.25
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161364) Fail...
Output for 5.6.24
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163968) Fail...
Output for 5.6.22
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161868) Fail...
Output for 5.6.20
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(137004) Fail...
Output for 5.6.19
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159348) Fail...
Output for 5.6.18
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(149310) Fail...
Output for 5.6.17
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(161028) Fail...
Output for 5.6.16
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(162288) Fail...
Output for 5.6.15
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(138936) Fail...
Output for 5.6.14
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(147672) Fail...
Output for 5.6.13
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(158172) Fail...
Output for 5.6.12
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(149688) Fail...
Output for 5.6.10
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(142212) Fail...
Output for 5.6.8
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160020) Fail...
Output for 5.6.7
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(163800) Fail...
Output for 5.6.5
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160272) Fail...
Output for 5.6.4
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(159936) Fail...
Output for 5.6.3
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(135324) Fail...
Output for 5.6.0, 5.6.2
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(160692) Fail...
Output for 5.6.1
s => string(1) "s" h => string(1) "h" strans => string(1) "s" htrans => string(32) "2510c39011c5be704182423e3a695e91" rtrans => int(162246) Fail...