3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function getZipCode($value) { return $value; } } $user = new User(); if (preg_match("/^[0-9]+$/",$user->getZipCode('489756'))) { $data['str'] = $user->getZipCode('489756'); } if (preg_match("/^[0-9]+$/",$user->getZipCode(489756))) { $data['int'] = $user->getZipCode(489756); } if (preg_match("/^[0-9]+$/",$user->getZipCode('489756d'))) { $data['badStr1'] = $user->getZipCode('489756d'); } var_dump($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 42
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 29
Branch analysis from position: 16
filename:       /in/0R3lH
function name:  (null)
number of ops:  46
compiled vars:  !0 = $user, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%5B0-9%5D%2B%24%2F'
          5        INIT_METHOD_CALL                                         !0, 'getZipCode'
          6        SEND_VAL_EX                                              '489756'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                         $6      
         10      > JMPZ                                                     $6, ->16
   13    11    >   INIT_METHOD_CALL                                         !0, 'getZipCode'
         12        SEND_VAL_EX                                              '489756'
         13        DO_FCALL                                      0  $8      
         14        ASSIGN_DIM                                               !1, 'str'
         15        OP_DATA                                                  $8
   15    16    >   INIT_FCALL                                               'preg_match'
         17        SEND_VAL                                                 '%2F%5E%5B0-9%5D%2B%24%2F'
         18        INIT_METHOD_CALL                                         !0, 'getZipCode'
         19        SEND_VAL_EX                                              489756
         20        DO_FCALL                                      0  $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                         $10     
         23      > JMPZ                                                     $10, ->29
   16    24    >   INIT_METHOD_CALL                                         !0, 'getZipCode'
         25        SEND_VAL_EX                                              489756
         26        DO_FCALL                                      0  $12     
         27        ASSIGN_DIM                                               !1, 'int'
         28        OP_DATA                                                  $12
   18    29    >   INIT_FCALL                                               'preg_match'
         30        SEND_VAL                                                 '%2F%5E%5B0-9%5D%2B%24%2F'
         31        INIT_METHOD_CALL                                         !0, 'getZipCode'
         32        SEND_VAL_EX                                              '489756d'
         33        DO_FCALL                                      0  $13     
         34        SEND_VAR                                                 $13
         35        DO_ICALL                                         $14     
         36      > JMPZ                                                     $14, ->42
   19    37    >   INIT_METHOD_CALL                                         !0, 'getZipCode'
         38        SEND_VAL_EX                                              '489756d'
         39        DO_FCALL                                      0  $16     
         40        ASSIGN_DIM                                               !1, 'badStr1'
         41        OP_DATA                                                  $16
   21    42    >   INIT_FCALL                                               'var_dump'
         43        SEND_VAR                                                 !1
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Class User:
Function getzipcode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0R3lH
function name:  getZipCode
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function getzipcode

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.3 ms | 945 KiB | 18 Q