3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // determine whether to use OpenSSL if (defined('PHP_WINDOWS_VERSION_BUILD') && version_compare(PHP_VERSION, '5.3.4', '<')) { var_dump(1); } elseif (!function_exists('openssl_random_pseudo_bytes')) { if (null !== $this->logger) { var_dump(2); } var_dump(3); } else { var_dump(4); }
Output for 5.4.34 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
int(4)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.4.32
Fatal error: Using $this when not in object context in /in/KYvC2 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: this in /in/KYvC2 on line 7 int(3)