3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function AddIntAndFloat(int $a, float $b): int { return (string) $a + $b; } try { echo AddIntAndFloat(1.4,'2'); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; } try { echo AddIntAndFloat(1,'2'); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; } try { echo AddIntAndFloat(1,1); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Found catch point at position: 28
Branch analysis from position: 28
2 jumps found. (Code = 107) Position 1 = 29, Position 2 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q1PAq
function name:  (null)
number of ops:  34
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'addintandfloat'
          1        SEND_VAL                                                 1.4
          2        SEND_VAL                                                 '2'
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
          5      > JMP                                                      ->11
    9     6  E > > CATCH                                       last         'TypeError'
   10     7    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $2      
          9        ECHO                                                     $2
         10        ECHO                                                     '%0A'
   14    11    >   INIT_FCALL                                               'addintandfloat'
         12        SEND_VAL                                                 1
         13        SEND_VAL                                                 '2'
         14        DO_FCALL                                      0  $3      
         15        ECHO                                                     $3
         16      > JMP                                                      ->22
   15    17  E > > CATCH                                       last         'TypeError'
   16    18    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         19        DO_FCALL                                      0  $4      
         20        ECHO                                                     $4
         21        ECHO                                                     '%0A'
   20    22    >   INIT_FCALL                                               'addintandfloat'
         23        SEND_VAL                                                 1
         24        SEND_VAL                                                 1
         25        DO_FCALL                                      0  $5      
         26        ECHO                                                     $5
         27      > JMP                                                      ->33
   21    28  E > > CATCH                                       last         'TypeError'
   22    29    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         30        DO_FCALL                                      0  $6      
         31        ECHO                                                     $6
         32        ECHO                                                     '%0A'
   23    33    > > RETURN                                                   1

Function addintandfloat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q1PAq
function name:  AddIntAndFloat
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        CAST                                          6  ~2      !0
          3        ADD                                              ~3      ~2, !1
          4        VERIFY_RETURN_TYPE                                       ~3
          5      > RETURN                                                   ~3
    5     6*       VERIFY_RETURN_TYPE                                       
          7*     > RETURN                                                   null

End of function addintandfloat

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.77 ms | 1442 KiB | 16 Q