3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mixed = array( 3, 3.4889211135, 3,88903098292, "3", "3.4889211135", "3,88903098292", 0, "0", false, "false", true, null, "?", "1.000,31", "1,000.31", "1,000.31", "1.000,31 USD", ); foreach ($mixed as $value) { printf("`var_dump( %s )` gives:" . PHP_EOL, $value); var_dump($value); printf("`var_dump( intval(%s) )` gives:" . PHP_EOL, $value); var_dump(@intval($value)); printf("`var_dump( (int)%s )` gives:" . PHP_EOL, $value); var_dump(@intval($value)); print "---------------------------------" . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 32
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 32
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/83okL
function name:  (null)
number of ops:  34
compiled vars:  !0 = $mixed, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   22     1      > FE_RESET_R                                       $3      !0, ->32
          2    > > FE_FETCH_R                                               $3, !1, ->32
   23     3    >   INIT_FCALL                                               'printf'
          4        SEND_VAL                                                 '%60var_dump%28+%25s+%29%60+gives%3A%0A'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   24     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   25    10        INIT_FCALL                                               'printf'
         11        SEND_VAL                                                 '%60var_dump%28+intval%28%25s%29+%29%60+gives%3A%0A'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   26    14        INIT_FCALL                                               'var_dump'
         15        BEGIN_SILENCE                                    ~7      
         16        CAST                                          4  ~8      !1
         17        END_SILENCE                                              ~7
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                                 
   27    20        INIT_FCALL                                               'printf'
         21        SEND_VAL                                                 '%60var_dump%28+%28int%29%25s+%29%60+gives%3A%0A'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   28    24        INIT_FCALL                                               'var_dump'
         25        BEGIN_SILENCE                                    ~11     
         26        CAST                                          4  ~12     !1
         27        END_SILENCE                                              ~11
         28        SEND_VAL                                                 ~12
         29        DO_ICALL                                                 
   29    30        ECHO                                                     '---------------------------------%0A'
   22    31      > JMP                                                      ->2
         32    >   FE_FREE                                                  $3
   31    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.27 ms | 1396 KiB | 17 Q