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!"; $payload = $_POST['payload']; $repo = $payload->repo; 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; }; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
2 jumps found. (Code = 46) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 80
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 80
Branch analysis from position: 42
Branch analysis from position: 34
filename:       /in/LqfuK
function name:  (null)
number of ops:  81
compiled vars:  !0 = $payload, !1 = $repo, !2 = $url, !3 = $bitbucketurl, !4 = $makeandcdcommand, !5 = $gitclonecommand, !6 = $makeandcd, !7 = $gitclone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22repository%22%3A+%7B%22website%22%3A+%22http%3A%2F%2Fclients.namanyayg.com%2Fdavidado%2Fasianfanfics%22%2C+%22fork%22%3A+false%2C+%22name%22%3A+%22AsianFanfics%22%2C+%22scm%22%3A+%22git%22%2C+%22owner%22%3A+%22namanyayg%22%2C+%22absolute_url%22%3A+%22%2Fnamanyayg%2Fasianfanfics%2F%22%2C+%22slug%22%3A+%22asianfanfics%22%2C+%22is_private%22%3A+true%7D%2C+%22truncated%22%3A+false%2C+%22commits%22%3A+%5B%7B%22node%22%3A+%225741782e36cb%22%2C+%22files%22%3A+%5B%7B%22type%22%3A+%22removed%22%2C+%22file%22%3A+%22README.md%22%7D%5D%2C+%22raw_author%22%3A+%22Namanyay+Goel+%3Cmail%40namanyayg.com%3E%22%2C+%22utctimestamp%22%3A+%222014-03-05+09%3A58%3A52%2B00%3A00%22%2C+%22author%22%3A+%22namanyayg%22%2C+%22timestamp%22%3A+%222014-03-05+10%3A58%3A52%22%2C+%22raw_node%22%3A+%225741782e36cbac80dc01bc3605eda95640a3f480%22%2C+%22parents%22%3A+%5B%221d0a82c82718%22%5D%2C+%22branch%22%3A+%22master%22%2C+%22message%22%3A+%22Removed+README%5Cn%22%2C+%22revision%22%3A+null%2C+%22size%22%3A+-1%7D%5D%2C+%22canon_url%22%3A+%22https%3A%2F%2Fbitbucket.org%22%2C+%22user%22%3A+%22namanyayg%22%7D'
          2        DO_ICALL                                         $8      
          3        ASSIGN                                                   !0, $8
    3     4        FETCH_OBJ_R                                      ~10     !0, 'repository'
          5        ASSIGN                                                   !1, ~10
    6     6        ECHO                                                     'Hi%21'
    8     7        FETCH_R                      global              ~12     '_POST'
          8        FETCH_DIM_R                                      ~13     ~12, 'payload'
          9        ASSIGN                                                   !0, ~13
    9    10        FETCH_OBJ_R                                      ~15     !0, 'repo'
         11        ASSIGN                                                   !1, ~15
   11    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'l+jS+%5Cof+F+Y+h%3Ai%3As+A'
         14        DO_ICALL                                         $17     
         15        CONCAT                                           ~18     'Deploying+on+', $17
         16        ECHO                                                     ~18
   12    17        BOOL                                             ~19     !0
         18        ECHO                                                     ~19
   13    19        FETCH_OBJ_R                                      ~20     !1, 'owner'
         20        IS_IDENTICAL                                     ~21     ~20, 'namanyayg'
         21        ECHO                                                     ~21
   14    22        INIT_FCALL                                               'strrpos'
         23        FETCH_OBJ_R                                      ~22     !1, 'absolute_url'
         24        SEND_VAL                                                 ~22
         25        SEND_VAL                                                 'namanyayg'
         26        DO_ICALL                                         $23     
         27        BOOL                                             ~24     $23
         28        ECHO                                                     ~24
   16    29        BOOL                                             ~25     !0
         30      > JMPZ_EX                                          ~25     ~25, ->34
         31    >   FETCH_OBJ_R                                      ~26     !1, 'owner'
         32        IS_IDENTICAL                                     ~27     ~26, 'namanyayg'
         33        BOOL                                             ~25     ~27
         34    > > JMPZ_EX                                          ~25     ~25, ->42
         35    >   INIT_FCALL                                               'strrpos'
         36        FETCH_OBJ_R                                      ~28     !1, 'absolute_url'
         37        SEND_VAL                                                 ~28
         38        SEND_VAL                                                 'namanyayg'
         39        DO_ICALL                                         $29     
         40        BOOL                                             ~30     $29
         41        BOOL                                             ~25     ~30
         42    > > JMPZ                                                     ~25, ->80
   19    43    >   INIT_FCALL                                               'str_replace'
         44        SEND_VAL                                                 'http%3A%2F%2Fclients.namanyayg.com%2F'
         45        SEND_VAL                                                 ''
         46        FETCH_OBJ_R                                      ~31     !1, 'website'
         47        SEND_VAL                                                 ~31
         48        DO_ICALL                                         $32     
         49        ASSIGN                                                   !2, $32
   20    50        INIT_FCALL                                               'substr'
         51        FETCH_OBJ_R                                      ~34     !1, 'absolute_url'
         52        SEND_VAL                                                 ~34
         53        SEND_VAL                                                 1
         54        SEND_VAL                                                 -1
         55        DO_ICALL                                         $35     
         56        ASSIGN                                                   !3, $35
   22    57        CONCAT                                           ~37     'True%21+', !2
         58        CONCAT                                           ~38     ~37, !3
         59        ECHO                                                     ~38
   24    60        CONCAT                                           ~39     'mkdir+', !2
         61        CONCAT                                           ~40     ~39, '+%26%26+cd+'
         62        CONCAT                                           ~41     ~40, !2
         63        ASSIGN                                                   !4, ~41
   25    64        CONCAT                                           ~43     'rm+-rf+%2A+%26%26+git+clone+git%40bitbucket.org%3A', !3
         65        CONCAT                                           ~44     ~43, '.git'
         66        ASSIGN                                                   !5, ~44
   27    67        CONCAT                                           ~46     'True%21+', !4
         68        CONCAT                                           ~47     ~46, !5
         69        ECHO                                                     ~47
   29    70        INIT_FCALL                                               'shell_exec'
         71        SEND_VAR                                                 !4
         72        DO_ICALL                                         $48     
         73        ASSIGN                                                   !6, $48
   30    74        INIT_FCALL                                               'shell_exec'
         75        SEND_VAR                                                 !5
         76        DO_ICALL                                         $50     
         77        ASSIGN                                                   !7, $50
   32    78        CONCAT                                           ~52     !6, !7
         79        ECHO                                                     ~52
   36    80    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.15 ms | 1404 KiB | 25 Q