3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ReferenceChecker { function __construct($starter = "AWB0") { $this->starter = $starter; } function check($reference) { return $this->startsWith($reference, $this->starter); } private function startsWith($haystack, $needle, $start = 0) { return strpos($haystack, $needle) === $start; } } $checker = new ReferenceChecker; $subject = "AWB012345"; $result = $checker->check($subject); var_dump($result); $subject = "12345"; $result = $checker->check($subject); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property ReferenceChecker::$starter is deprecated in /in/aZsfV on line 5 bool(true) bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.73 ms | 401 KiB | 8 Q