3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
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 Warning: shell_exec(): Unable to execute 'mkdir davidado/asianfanfics && cd davidado/asianfanfics' in /in/a2a1u on line 26 Warning: shell_exec(): Unable to execute 'rm -rf * && git clone git@bitbucket.org:namanyayg/asianfanfics.git' in /in/a2a1u on line 27

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