3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vals = array('3 fish', ' +01.0001 ', ' +01.0000000 ', true, false, null, 1e8); foreach ($vals as $val) { printf("is %s an int? %s == %s --> %s\n", var_export($val, true), var_export((string)(int)$val, true), var_export(trim($val), true), var_export((string)(int)$val == trim($val), true) ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 38
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 38
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/Gog9g
function name:  (null)
number of ops:  40
compiled vars:  !0 = $vals, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->38
          2    > > FE_FETCH_R                                               $3, !1, ->38
    5     3    >   INIT_FCALL                                               'printf'
          4        SEND_VAL                                                 'is+%25s+an+int%3F+%25s+%3D%3D+%25s+--%3E+%25s%0A'
    6     5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
    7    10        INIT_FCALL                                               'var_export'
         11        CAST                                          4  ~5      !1
         12        CAST                                          6  ~6      ~5
         13        SEND_VAL                                                 ~6
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
    8    17        INIT_FCALL                                               'var_export'
         18        INIT_FCALL                                               'trim'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $9      
         24        SEND_VAR                                                 $9
    9    25        INIT_FCALL                                               'var_export'
         26        CAST                                          4  ~10     !1
         27        CAST                                          6  ~11     ~10
         28        INIT_FCALL                                               'trim'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $12     
         31        IS_EQUAL                                         ~13     $12, ~11
         32        SEND_VAL                                                 ~13
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $14     
         35        SEND_VAR                                                 $14
         36        DO_ICALL                                                 
    4    37      > JMP                                                      ->2
         38    >   FE_FREE                                                  $3
   11    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.96 ms | 1396 KiB | 19 Q