3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class some_class { //Public $logfile = “./log/bla.log”; //Public $data = “THIS IS TEMP”; Public function log(){ File_put_contents($this->logfile, $this->data); } Public function __destruct() { $this->log(); } } $a = new some_class; serialize($a);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined property: some_class::$logfile in /in/MGP1A on line 6 Warning: Undefined property: some_class::$data in /in/MGP1A on line 6 Deprecated: file_put_contents(): Passing null to parameter #1 ($filename) of type string is deprecated in /in/MGP1A on line 6 Fatal error: Uncaught ValueError: Path cannot be empty in /in/MGP1A:6 Stack trace: #0 /in/MGP1A(6): file_put_contents('', NULL) #1 /in/MGP1A(9): some_class->log() #2 [internal function]: some_class->__destruct() #3 {main} thrown in /in/MGP1A on line 6
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:
44.29 ms | 401 KiB | 8 Q