3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = pi(); $a = strval($str); $b = (string)$str; $c = "$str"; var_dump($a); var_dump($b); var_dump($c); echo gettype(M_PI);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UuVkv
function name:  (null)
number of ops:  21
compiled vars:  !0 = $str, !1 = $a, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'pi'
          1        DO_ICALL                                         $4      
          2        ASSIGN                                                   !0, $4
    5     3        CAST                                          6  ~6      !0
          4        ASSIGN                                                   !1, ~6
    6     5        CAST                                          6  ~8      !0
          6        ASSIGN                                                   !2, ~8
    7     7        CAST                                          6  ~10     !0
          8        ASSIGN                                                   !3, ~10
    9     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   11    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   13    18        GET_TYPE                                         ~15     3.14159
         19        ECHO                                                     ~15
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.14 ms | 1395 KiB | 17 Q