3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace teachme; ApiError(123, "Fuck"); function ApiError($ErrorCode, $ErrorMsg) { header("X-API-Status: ".$ErrorCode." ".$ErrorMsg); if($ErrorCode != 40000) { $Message = $ErrorCode." ".$ErrorMsg."" . " - [".$_SERVER["HTTP-USER-AGENT"]."]" . " - [".$_SERVER["REMOTE_ADDR"]."]" . " - (User: ".(($_SESSION["TeachMe-Server"]["loggedin"] === true) ? $_SESSION["TeachMe-Server"]["User"]["ID"] : "<none>").")"; error_log($Message, 3, '../data/api_error.log'); } die(); }
Output for git.master, git.master_jit
Warning: Undefined array key "HTTP-USER-AGENT" in /in/3Q1Fr on line 11 Warning: Undefined array key "REMOTE_ADDR" in /in/3Q1Fr on line 12 Warning: Undefined global variable $_SESSION in /in/3Q1Fr on line 13 Warning: Trying to access array offset on value of type null in /in/3Q1Fr on line 13 Warning: Trying to access array offset on value of type null in /in/3Q1Fr on line 13 Warning: error_log(): open_basedir restriction in effect. File(../data/api_error.log) is not within the allowed path(s): (/tmp:/in:/etc) in /in/3Q1Fr on line 14 Warning: error_log(../data/api_error.log): Failed to open stream: Operation not permitted in /in/3Q1Fr on line 14
Output for rfc.property-hooks
Warning: Undefined array key "HTTP-USER-AGENT" in /in/3Q1Fr on line 11 Warning: Undefined array key "REMOTE_ADDR" in /in/3Q1Fr on line 12 Warning: Undefined global variable $_SESSION in /in/3Q1Fr on line 13 Warning: Trying to access array offset on null in /in/3Q1Fr on line 13 Warning: Trying to access array offset on null in /in/3Q1Fr on line 13 Warning: error_log(): open_basedir restriction in effect. File(../data/api_error.log) is not within the allowed path(s): (/tmp:/in:/etc) in /in/3Q1Fr on line 14 Warning: error_log(../data/api_error.log): Failed to open stream: Operation not permitted in /in/3Q1Fr on line 14

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:
30.73 ms | 402 KiB | 8 Q