3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $payload = json_decode('{"repository": {"website": "http://clients.namanyayg.com/davidado/asianfanfics", "fork": false, "name": "AsianFanfics", "scm": "git", "owner": "namanyayg", "absolute_url": "/namanyayg/asianfanfics/", "slug": "asianfanfics", "is_private": true}, "truncated": false, "commits": [{"node": "5741782e36cb", "files": [{"type": "removed", "file": "README.md"}], "raw_author": "Namanyay Goel <mail@namanyayg.com>", "utctimestamp": "2014-03-05 09:58:52+00:00", "author": "namanyayg", "timestamp": "2014-03-05 10:58:52", "raw_node": "5741782e36cbac80dc01bc3605eda95640a3f480", "parents": ["1d0a82c82718"], "branch": "master", "message": "Removed README\n", "revision": null, "size": -1}], "canon_url": "https://bitbucket.org", "user": "namanyayg"}'); $repo = $payload->repository; echo "Hi!"; echo 'Deploying on ' . date('l jS \of F Y h:i:s A'); echo $payload == true; echo $repo->owner === 'namanyayg'; echo strrpos($repo->absolute_url, 'namanyayg') == true; if ( $payload == true && $repo->owner === 'namanyayg' && strrpos($repo->absolute_url, 'namanyayg') == true ) { $url = str_replace('http://clients.namanyayg.com/', '', $repo->website); $bitbucketurl = substr($repo->absolute_url, 1, -1); echo 'True! ' . $url . $bitbucketurl; $makeandcdcommand = 'mkdir ' . $url . ' && cd ' . $url; $gitclonecommand = 'rm -rf * && ' . 'git clone git@bitbucket.org:' . $bitbucketurl . '.git'; echo 'True! ' . $makeandcdcommand . $gitclonecommand; $makeandcd = shell_exec($makeandcdcommand); $gitclone = shell_exec($gitclonecommand); echo $makeandcd . $gitclone; }; ?>
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Hi!Deploying on Wednesday 5th of March 2014 12:15:29 PM111True! davidado/asianfanficsnamanyayg/asianfanficsTrue! mkdir davidado/asianfanfics && cd davidado/asianfanficsrm -rf * && git clone git@bitbucket.org:namanyayg/asianfanfics.git
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/a2a1u on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/a2a1u on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/a2a1u on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/a2a1u on line 2