3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestSampleClass { public function doSomething($one = null, $two, $threee = null) { return null; } } $tests = array( array('one', null), array('two', null), array('three', null) ); foreach($tests as $test) { $param = new ReflectionParameter(array('TestSampleClass', 'doSomething'), $test[0]); var_dump($param->isDefaultValueAvailable()); }

preferences:
40.42 ms | 402 KiB | 5 Q