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; }; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 37
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 75
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 75
Branch analysis from position: 37
Branch analysis from position: 29
filename:       /in/a2a1u
function name:  (null)
number of ops:  76
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        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'l+jS+%5Cof+F+Y+h%3Ai%3As+A'
          9        DO_ICALL                                         $12     
         10        CONCAT                                           ~13     'Deploying+on+', $12
         11        ECHO                                                     ~13
    9    12        BOOL                                             ~14     !0
         13        ECHO                                                     ~14
   10    14        FETCH_OBJ_R                                      ~15     !1, 'owner'
         15        IS_IDENTICAL                                     ~16     ~15, 'namanyayg'
         16        ECHO                                                     ~16
   11    17        INIT_FCALL                                               'strrpos'
         18        FETCH_OBJ_R                                      ~17     !1, 'absolute_url'
         19        SEND_VAL                                                 ~17
         20        SEND_VAL                                                 'namanyayg'
         21        DO_ICALL                                         $18     
         22        BOOL                                             ~19     $18
         23        ECHO                                                     ~19
   13    24        BOOL                                             ~20     !0
         25      > JMPZ_EX                                          ~20     ~20, ->29
         26    >   FETCH_OBJ_R                                      ~21     !1, 'owner'
         27        IS_IDENTICAL                                     ~22     ~21, 'namanyayg'
         28        BOOL                                             ~20     ~22
         29    > > JMPZ_EX                                          ~20     ~20, ->37
         30    >   INIT_FCALL                                               'strrpos'
         31        FETCH_OBJ_R                                      ~23     !1, 'absolute_url'
         32        SEND_VAL                                                 ~23
         33        SEND_VAL                                                 'namanyayg'
         34        DO_ICALL                                         $24     
         35        BOOL                                             ~25     $24
         36        BOOL                                             ~20     ~25
         37    > > JMPZ                                                     ~20, ->75
   16    38    >   INIT_FCALL                                               'str_replace'
         39        SEND_VAL                                                 'http%3A%2F%2Fclients.namanyayg.com%2F'
         40        SEND_VAL                                                 ''
         41        FETCH_OBJ_R                                      ~26     !1, 'website'
         42        SEND_VAL                                                 ~26
         43        DO_ICALL                                         $27     
         44        ASSIGN                                                   !2, $27
   17    45        INIT_FCALL                                               'substr'
         46        FETCH_OBJ_R                                      ~29     !1, 'absolute_url'
         47        SEND_VAL                                                 ~29
         48        SEND_VAL                                                 1
         49        SEND_VAL                                                 -1
         50        DO_ICALL                                         $30     
         51        ASSIGN                                                   !3, $30
   19    52        CONCAT                                           ~32     'True%21+', !2
         53        CONCAT                                           ~33     ~32, !3
         54        ECHO                                                     ~33
   21    55        CONCAT                                           ~34     'mkdir+', !2
         56        CONCAT                                           ~35     ~34, '+%26%26+cd+'
         57        CONCAT                                           ~36     ~35, !2
         58        ASSIGN                                                   !4, ~36
   22    59        CONCAT                                           ~38     'rm+-rf+%2A+%26%26+git+clone+git%40bitbucket.org%3A', !3
         60        CONCAT                                           ~39     ~38, '.git'
         61        ASSIGN                                                   !5, ~39
   24    62        CONCAT                                           ~41     'True%21+', !4
         63        CONCAT                                           ~42     ~41, !5
         64        ECHO                                                     ~42
   26    65        INIT_FCALL                                               'shell_exec'
         66        SEND_VAR                                                 !4
         67        DO_ICALL                                         $43     
         68        ASSIGN                                                   !6, $43
   27    69        INIT_FCALL                                               'shell_exec'
         70        SEND_VAR                                                 !5
         71        DO_ICALL                                         $45     
         72        ASSIGN                                                   !7, $45
   29    73        CONCAT                                           ~47     !6, !7
         74        ECHO                                                     ~47
   33    75    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.63 ms | 1409 KiB | 25 Q