3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Qualtrics { public $input; public function __construct($input) { $this->input = $input; } public function output(){ if($this->allowedFormat($this->input)) { echo $this->input; } else { echo 'Disallowed Characters'; } } private function multiply($factor){ $this->input *=factor; } private function allowedFormat($qString){ return preg_match("/^[a-z0-9:_/\-]+$/i", $qString); } } $qObject2 = new Qualtrics(10); $qObject2 -> multiply(3); $qObject2 -> output();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to private method Qualtrics::multiply() from global scope in /in/oJvQc:25 Stack trace: #0 {main} thrown in /in/oJvQc on line 25
Process exited with code 255.

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.71 ms | 401 KiB | 8 Q