3v4l.org

run code in 500+ PHP versions simultaneously
<?php $myVariable1 = '2345'; $myVariable2 = 4433; $myVariable3 = 'test'; $myVariable4 = '1345.33'; function makeInteger($val){ return is_numeric($val) ? (int)$val : null; } for($i=1;$i<=4;$i++){ echo makeInteger(${"myVariable".$i}).PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/lA5Se
function name:  (null)
number of ops:  17
compiled vars:  !0 = $myVariable1, !1 = $myVariable2, !2 = $myVariable3, !3 = $myVariable4, !4 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '2345'
    4     1        ASSIGN                                                       !1, 4433
    5     2        ASSIGN                                                       !2, 'test'
    6     3        ASSIGN                                                       !3, '1345.33'
   10     4        ASSIGN                                                       !4, 1
          5      > JMP                                                          ->14
   11     6    >   INIT_FCALL                                                   'makeinteger'
          7        CONCAT                                               ~10     'myVariable', !4
          8        FETCH_R                          local               ~11     ~10
          9        SEND_VAL                                                     ~11
         10        DO_FCALL                                          0  $12     
         11        CONCAT                                               ~13     $12, '%0A'
         12        ECHO                                                         ~13
   10    13        PRE_INC                                                      !4
         14    >   IS_SMALLER_OR_EQUAL                                          !4, 4
         15      > JMPNZ                                                        ~15, ->6
   12    16    > > RETURN                                                       1

Function makeinteger:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lA5Se
function name:  makeInteger
number of ops:  9
compiled vars:  !0 = $val
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        FRAMELESS_ICALL_1                is_numeric          ~1      !0
          2      > JMPZ                                                         ~1, ->6
          3    >   CAST                                              4  ~2      !0
          4        QM_ASSIGN                                            ~3      ~2
          5      > JMP                                                          ->7
          6    >   QM_ASSIGN                                            ~3      null
          7    > > RETURN                                                       ~3
    9     8*     > RETURN                                                       null

End of function makeinteger

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.42 ms | 2079 KiB | 14 Q