3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db = new PDO('sqlite::memory:'); $st = $db->query(" SELECT 'phpinfo()'"); $re = $st->fetchAll(PDO::FETCH_FUNC, 'assert'); var_dump($re);
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
array(1) { [0]=> bool(true) }
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: Cannot call assert() with string argument dynamically in /in/Nh1sn on line 5 array(1) { [0]=> bool(false) }
Output for 7.0.1 - 7.0.20
Warning: phpinfo() has been disabled for security reasons in /in/Nh1sn(5) : assert code on line 1 Warning: assert(): Assertion "phpinfo()" failed in /in/Nh1sn on line 5 array(1) { [0]=> bool(false) }
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0
Warning: phpinfo() has been disabled for security reasons in /in/Nh1sn(5) : assert code on line 1 Warning: assert(): Assertion "phpinfo()" failed in /in/Nh1sn on line 5 array(1) { [0]=> NULL }

preferences:
213.75 ms | 402 KiB | 271 Q