3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = null; $a ??= true; $a = [ ['a' => true, 'b' => true], ['a' => false, 'b' => true], ['a' => true, 'b' => true], ['a' => false, 'b' => true] ]; $a = 1; $a += 2 + 3; $a = null; var_dump($a->getTest() ?? false);
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
Fatal error: Uncaught Error: Call to a member function getTest() on null in /in/BpELT:19 Stack trace: #0 {main} thrown in /in/BpELT on line 19
Process exited with code 255.

preferences:
69.62 ms | 402 KiB | 65 Q