3v4l.org

run code in 500+ PHP versions simultaneously
<?php $response = '{"users":[{ "kind":"admin#directory#user", "id":"115906813143010867543", "etag":"", "primaryEmail":"amr@domain.com", "name":{ "givenName":"amr", "familyName":"h", "fullName":"amr h" }, "isAdmin":false, "isDelegatedAdmin":false, "lastLoginTime":"1970-01-01T00:00:00.000Z", "creationTime":"2021-01-11T20:46:25.000Z", "agreedToTerms":false, "suspended":true, "suspensionReason":"ADMIN", "archived":false, "changePasswordAtNextLogin":true, "ipWhitelisted":false, "emails":[ { "address":"amr@domain.com", "primary":true }, { "address":"amr@domain.com.test-google-a.com" } ], "nonEditableAliases":[ "amr@domain.com.test-google-a.com" ], "customerId":"C04357r1m", "orgUnitPath":"/", "isMailboxSetup":true, "includeInGlobalAddressList":true, "recoveryEmail":"" }]}'; $resJson = json_decode($response, TRUE); $exc = ['someone.else@donotdisplay.me']; foreach($resJson["users"] as $user) { if(!in_array($user['primaryEmail'], $exc)) { if($user['suspended'] == false) { var_dump('unsuspended'); } elseif($user['suspended'] == true) { var_dump('suspended'); } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 28
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 28
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 27
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 27
Branch analysis from position: 27
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/erIcg
function name:  (null)
number of ops:  30
compiled vars:  !0 = $response, !1 = $resJson, !2 = $exc, !3 = $user
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B%22users%22%3A%5B%7B%0A+++%22kind%22%3A%22admin%23directory%23user%22%2C%0A+++%22id%22%3A%22115906813143010867543%22%2C%0A+++%22etag%22%3A%22%22%2C%0A+++%22primaryEmail%22%3A%22amr%40domain.com%22%2C%0A+++%22name%22%3A%7B%0A++++++%22givenName%22%3A%22amr%22%2C%0A++++++%22familyName%22%3A%22h%22%2C%0A++++++%22fullName%22%3A%22amr+h%22%0A+++%7D%2C%0A+++%22isAdmin%22%3Afalse%2C%0A+++%22isDelegatedAdmin%22%3Afalse%2C%0A+++%22lastLoginTime%22%3A%221970-01-01T00%3A00%3A00.000Z%22%2C%0A+++%22creationTime%22%3A%222021-01-11T20%3A46%3A25.000Z%22%2C%0A+++%22agreedToTerms%22%3Afalse%2C%0A+++%22suspended%22%3Atrue%2C%0A+++%22suspensionReason%22%3A%22ADMIN%22%2C%0A+++%22archived%22%3Afalse%2C%0A+++%22changePasswordAtNextLogin%22%3Atrue%2C%0A+++%22ipWhitelisted%22%3Afalse%2C%0A+++%22emails%22%3A%5B%0A++++++%7B%0A+++++++++%22address%22%3A%22amr%40domain.com%22%2C%0A+++++++++%22primary%22%3Atrue%0A++++++%7D%2C%0A++++++%7B%0A+++++++++%22address%22%3A%22amr%40domain.com.test-google-a.com%22%0A++++++%7D%0A+++%5D%2C%0A+++%22nonEditableAliases%22%3A%5B%0A++++++%22amr%40domain.com.test-google-a.com%22%0A+++%5D%2C%0A+++%22customerId%22%3A%22C04357r1m%22%2C%0A+++%22orgUnitPath%22%3A%22%2F%22%2C%0A+++%22isMailboxSetup%22%3Atrue%2C%0A+++%22includeInGlobalAddressList%22%3Atrue%2C%0A+++%22recoveryEmail%22%3A%22%22%0A%7D%5D%7D'
   41     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   42     6        ASSIGN                                                       !2, <array>
   43     7        FETCH_DIM_R                                          ~8      !1, 'users'
          8      > FE_RESET_R                                           $9      ~8, ->28
          9    > > FE_FETCH_R                                                   $9, !3, ->28
   44    10    >   FETCH_DIM_R                                          ~10     !3, 'primaryEmail'
         11        FRAMELESS_ICALL_2                in_array            ~11     ~10, !2
         12        BOOL_NOT                                             ~12     ~11
         13      > JMPZ                                                         ~12, ->27
   46    14    >   FETCH_DIM_R                                          ~13     !3, 'suspended'
         15        IS_EQUAL                                                     ~13, <false>
         16      > JMPZ                                                         ~14, ->21
   48    17    >   INIT_FCALL                                                   'var_dump'
         18        SEND_VAL                                                     'unsuspended'
         19        DO_ICALL                                                     
   46    20      > JMP                                                          ->27
   50    21    >   FETCH_DIM_R                                          ~16     !3, 'suspended'
         22        IS_EQUAL                                                     ~16, <true>
         23      > JMPZ                                                         ~17, ->27
   52    24    >   INIT_FCALL                                                   'var_dump'
         25        SEND_VAL                                                     'suspended'
         26        DO_ICALL                                                     
   43    27    > > JMP                                                          ->9
         28    >   FE_FREE                                                      $9
   55    29      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.07 ms | 2010 KiB | 15 Q