3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseTicketName($ticketName) { global $sites; $system = substr($ticket, 0, 2); // pull out managment system $ticketName = substr($ticketName, 2); // remove management system // Find first occurence of number $firstNumber = strcspn($str, '0123456789'); // Get project name $project = substr($ticketName, 0, $firstNumber); // Get ticket ID $ticket_id = substr($ticketName, $firstNumber); // remove project, and only thing left is ticket ID return compat($system, $project, $ticket_id); } $s = "ASFX10"; var_dump(parseTicketName($s));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Siv9J
function name:  (null)
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, 'ASFX10'
   21     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'parseticketname'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function parseticketname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Siv9J
function name:  parseTicketName
number of ops:  36
compiled vars:  !0 = $ticketName, !1 = $sites, !2 = $system, !3 = $ticket, !4 = $firstNumber, !5 = $str, !6 = $project, !7 = $ticket_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BIND_GLOBAL                                              !1, 'sites'
    5     2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !3
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
    6     8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !0, $10
    9    13        INIT_FCALL                                               'strcspn'
         14        SEND_VAR                                                 !5
         15        SEND_VAL                                                 '0123456789'
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !4, $12
   12    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 0
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                         $14     
         23        ASSIGN                                                   !6, $14
   15    24        INIT_FCALL                                               'substr'
         25        SEND_VAR                                                 !0
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                         $16     
         28        ASSIGN                                                   !7, $16
   17    29        INIT_FCALL_BY_NAME                                       'compat'
         30        SEND_VAR_EX                                              !2
         31        SEND_VAR_EX                                              !6
         32        SEND_VAR_EX                                              !7
         33        DO_FCALL                                      0  $18     
         34      > RETURN                                                   $18
   18    35*     > RETURN                                                   null

End of function parseticketname

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.04 ms | 1394 KiB | 20 Q