3v4l.org

run code in 300+ PHP versions simultaneously
<?php function go_replace_get($tip,$id1="",$id2="",$id3="",$id4="",$id5="") { global $ayar; $tip = 'aktif_'.$tip.'_redirect'; $url = $ayar[$tip]; $url = preg_replace('@{id1}@si',$id1,$url); $url = preg_replace('@{id2}@si',$id2,$url); $url = preg_replace('@{id3}@si',$id3,$url); $url = preg_replace('@{id4}@si',$id4,$url); $url = preg_replace('@{id5}@si',$id5,$url); return $url; } echo go_replace_get("okru",'34135411244',"","");
Output for 8.3.0 - 8.3.4, 8.3.6
Warning: Trying to access array offset on null in /in/dETOD on line 6 Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/dETOD on line 7
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Trying to access array offset on null in /in/dETOD on line 6 Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/dETOD on line 7
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: Trying to access array offset on value of type null in /in/dETOD on line 6 Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/dETOD on line 7
Output for 8.0.0 - 8.0.30
Warning: Trying to access array offset on value of type null in /in/dETOD on line 6
Output for 7.4.0 - 7.4.33
Notice: Trying to access array offset on value of type null in /in/dETOD on line 6
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33

preferences:
182.73 ms | 402 KiB | 226 Q