3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo (int) "0xf" + 2.8; // 2.8 echo (int) ("0xf" + 2.8); // 17 echo intval("0xf", 16) + (int) 2.8; // 17 echo intval("0xf", 0) + (int) 2.8; // 17
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MqcnP
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          4  ~0      '0xf'
          1        ADD                                              ~1      ~0, 2.8
          2        ECHO                                                     ~1
    3     3        ADD                                              ~2      '0xf', 2.8
          4        CAST                                          4  ~3      ~2
          5        ECHO                                                     ~3
    4     6        INIT_FCALL                                               'intval'
          7        SEND_VAL                                                 '0xf'
          8        SEND_VAL                                                 16
          9        DO_ICALL                                         $4      
         10        CAST                                          4  ~5      2.8
         11        ADD                                              ~6      $4, ~5
         12        ECHO                                                     ~6
    5    13        INIT_FCALL                                               'intval'
         14        SEND_VAL                                                 '0xf'
         15        SEND_VAL                                                 0
         16        DO_ICALL                                         $7      
         17        CAST                                          4  ~8      2.8
         18        ADD                                              ~9      $7, ~8
         19        ECHO                                                     ~9
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.7 ms | 1395 KiB | 15 Q