3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hex2bin($h) { if (!is_string($h)) return null; $r=''; for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); } return $r; } $encoded = bin2hex('ijok'); echo hex2bin($encoded); ?>

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.1.70.0080.00417.09
7.1.60.0180.00934.86
7.1.50.0060.02334.54
7.1.40.0090.01534.29
7.1.30.0110.01434.48
7.1.20.0140.01134.52
7.1.10.0060.00616.37
7.1.00.0060.00616.46
7.0.200.0080.00416.48
7.0.190.0040.00816.53
7.0.180.0030.01215.99
7.0.170.0000.01216.29
7.0.160.0000.01316.11
7.0.150.0000.01316.09
7.0.140.0080.00816.30
7.0.130.0100.00316.08
7.0.120.0050.00916.26
7.0.110.0000.01216.16
7.0.100.0040.00816.07
7.0.90.0060.00616.32
7.0.80.0040.00715.93
7.0.70.0000.01116.00
7.0.60.0040.00816.02
7.0.50.0060.00616.15
7.0.40.0040.00816.45
7.0.30.0040.00716.37
7.0.20.0040.00816.16
7.0.10.0040.00816.14
7.0.00.0060.00616.22

preferences:
139 ms | 1386 KiB | 7 Q