3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encryptMethodLength($encryptMethod) { $number = filter_var($encryptMethod, FILTER_SANITIZE_NUMBER_INT); return intval(abs($number)); } var_dump(encryptMethodLength(1)); var_dump(encryptMethodLength('1')); var_dump(encryptMethodLength("test")); var_dump(encryptMethodLength(1));
Output for git.master, git.master_jit, rfc.property-hooks
int(1) int(1) Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /in/PlI5c:6 Stack trace: #0 /in/PlI5c(6): abs('') #1 /in/PlI5c(11): encryptMethodLength('test') #2 {main} thrown in /in/PlI5c on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.3 ms | 406 KiB | 5 Q