3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = get_magic_quotes_gpc(); $b = ini_get("magic_quotes_gpc"); var_dump($a); var_dump($b); echo "1) ".get_magic_quotes_gpc()." >> "; echo "2) ".ini_get("magic_quotes_gpc")." >> "; echo "1) ".get_magic_quotes_runtime()." >> "; echo "2) ".ini_get("magic_quotes_runtime")." >> "; $str = "'\""; $arr = array(); $arr[] = "string : ".$str; $arr[] = "addslashes : ".addslashes($str); $arr[] = "stripslashes : ".stripslashes($str); $arr[] = "htmlentities : ".htmlentities($str); $arr[] = "testing : '".$str."'"; print_r($arr);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /in/IBRA5:2 Stack trace: #0 {main} thrown in /in/IBRA5 on line 2
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: Function get_magic_quotes_gpc() is deprecated in /in/IBRA5 on line 2 bool(false) bool(false) Deprecated: Function get_magic_quotes_gpc() is deprecated in /in/IBRA5 on line 6 1) >> 2) >> Deprecated: Function get_magic_quotes_runtime() is deprecated in /in/IBRA5 on line 9 1) >> 2) >> Array ( [0] => string : '" [1] => addslashes : \'\" [2] => stripslashes : '" [3] => htmlentities : '&quot; [4] => testing : ''"' )
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
bool(false) bool(false) 1) >> 2) >> 1) >> 2) >> Array ( [0] => string : '" [1] => addslashes : \'\" [2] => stripslashes : '" [3] => htmlentities : '&quot; [4] => testing : ''"' )
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
int(1) string(1) "1" 1) 1 >> 2) 1 >> 1) 0 >> 2) 0 >> Array ( [0] => string : '" [1] => addslashes : \'\" [2] => stripslashes : '" [3] => htmlentities : '&quot; [4] => testing : ''"' )

preferences:
278.16 ms | 403 KiB | 397 Q