3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "12-04-2013"; $s1 = strtok($str,"-"); $s2 = strtok("-"); $s3 = strtok("\n"); echo ("$s1 $s2 $s3"); $num = intval($s2); echo (" $num"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4b9XN
function name:  (null)
number of ops:  26
compiled vars:  !0 = $str, !1 = $s1, !2 = $s2, !3 = $s3, !4 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '12-04-2013'
    4     1        INIT_FCALL                                               'strtok'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '-'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6        INIT_FCALL                                               'strtok'
          7        SEND_VAL                                                 '-'
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    6    10        INIT_FCALL                                               'strtok'
         11        SEND_VAL                                                 '%0A'
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
    8    14        ROPE_INIT                                     5  ~13     !1
         15        ROPE_ADD                                      1  ~13     ~13, '+'
         16        ROPE_ADD                                      2  ~13     ~13, !2
         17        ROPE_ADD                                      3  ~13     ~13, '+'
         18        ROPE_END                                      4  ~12     ~13, !3
         19        ECHO                                                     ~12
   10    20        CAST                                          4  ~16     !2
         21        ASSIGN                                                   !4, ~16
   11    22        NOP                                                      
         23        FAST_CONCAT                                      ~18     '+', !4
         24        ECHO                                                     ~18
   12    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1386 KiB | 15 Q