3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_assert($string, $arguments = array()) { // Make sure we don't pass in an empty string. assert('$string !== \'\' && (empty($arguments) || strtr($string, $arguments) !== \'\')'); // Make sure we don't translate unnecessarily. assert('empty($arguments) || strtr($string, $arguments) != implode($arguments)'); } test_assert('@test f', ['@test' => 'test']);

preferences:
47.82 ms | 402 KiB | 5 Q