ns - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of ns.php

  1. <?php
  2. /**
  3.  * Check if a string is serialized
  4.  *
  5.  * @param string $string
  6.  *
  7.  * @return bool
  8.  */
  9. function isSerialized($string) {
  10.     return (@unserialize($string) !== false || $string == 'b:0;');
  11. }
  12.  
  13. // usage
  14. $string = 'a:1:{s:7:"website";a:2:{s:6:"domain";s:9:"wtools.io";s:5:"title";s:16:"Online Web Tools";}}';
  15. if(isSerialized($string)!==false){
  16.     echo "it's serialized string";
  17. } else {
  18.     echo "not serialized string";
  19. stk:0702555398
  20. SHD BANK
  21. VO KIM LY
  22.  
  23.  
File Description
  • ns
  • PHP Code
  • 12 Feb-2024
  • 461 Bytes
You can Share it: