3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "111"; $intval = intval($input); echo json_encode($intval); echo $input==$intval; $input = "111"; $intval = intval($input); echo json_encode($intval); echo $input==$intval; $input = "5610a"; $intval = intval($input); echo json_encode($intval); echo $input==$intval;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IDdMi
function name:  (null)
number of ops:  28
compiled vars:  !0 = $input, !1 = $intval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '111'
    4     1        CAST                                          4  ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ECHO                                                     $5
    6     7        IS_EQUAL                                         ~6      !0, !1
          8        ECHO                                                     ~6
    8     9        ASSIGN                                                   !0, '111'
    9    10        CAST                                          4  ~8      !0
         11        ASSIGN                                                   !1, ~8
   10    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
   11    16        IS_EQUAL                                         ~11     !0, !1
         17        ECHO                                                     ~11
   13    18        ASSIGN                                                   !0, '5610a'
   14    19        CAST                                          4  ~13     !0
         20        ASSIGN                                                   !1, ~13
   15    21        INIT_FCALL                                               'json_encode'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $15     
         24        ECHO                                                     $15
   16    25        IS_EQUAL                                         ~16     !0, !1
         26        ECHO                                                     ~16
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.48 ms | 1395 KiB | 15 Q