3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; $t1 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { \array_key_exists("key", $array); } $t2 = hrtime(true); $t3 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { isset($array["key"]); } $t4 = hrtime(true); echo "With function: " . (($t2 - $t1) / 1000000) . " ms\n"; echo "With isset : " . (($t4 - $t3) / 1000000) . " ms\n";

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
42.34 ms | 1515 KiB | 4 Q