A sad!? - 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 A sad!?.php

  1. <?php
  2.         //Enter your code here, enjoy!
  3.  
  4. $array =  [
  5.     ['id' => 0],
  6.     ['id' => 1],
  7.     ['id' => 2],
  8.     ['id' => 3],
  9.     ['id' => "3"],
  10.     ['id' => "1"]
  11.     ];
  12.               
  13. echo "PLAIN\n";
  14. var_dump($array);
  15.  
  16. echo "BEZ parama";
  17. var_dump(array_unique($array));
  18.  
  19. echo "SA paramom\n\n";
  20. var_dump(array_unique($array, SORT_REGULAR));
File Description
  • A sad!?
  • PHP Code
  • 18 Dec-2020
  • 340 Bytes
You can Share it: