3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Abstract Surfer Class * * @package hangten */ abstract class Surfer { abstract protected function rideWave($amplitude); public function applyWax($waxType){ echo("Ahh, all waxed up with '".$waxType."'. Ready to go!"); } public function paddleOut(){ echo("Paddling...."); } public function screamShark(){ echo("SHARK!!"); } } /** * RookieSurfer Class * * This surfer is green and can barely surf. * @package hangten */ class RookieSurfer extends Surfer { protected function rideWave($amplitude = 1){ echo("Trying.. Trying.. to ride a ".$amplitude."ft. wave, whew!"); } } /** * ProSurfer Class * * This surfer is crazy skilled!! * @package hangten */ class ProSurfer extends Surfer { protected function rideWave($amplitude = 8){ echo("Riding a ".$amplitude."ft. wave backwards doing a backflip!"); } } $rookie = new RookieSurfer; $rookie->applyWax('candleWax') ->paddleout() ->rideWave(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  (null)
number of ops:  12
compiled vars:  !0 = $rookie
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   NEW                                              $1      'RookieSurfer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   53     3        INIT_METHOD_CALL                                         !0, 'applyWax'
          4        SEND_VAL_EX                                              'candleWax'
          5        DO_FCALL                                      0  $4      
   54     6        INIT_METHOD_CALL                                         $4, 'paddleout'
          7        DO_FCALL                                      0  $5      
   55     8        INIT_METHOD_CALL                                         $5, 'rideWave'
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Surfer:
Function ridewave:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  rideWave
number of ops:  2
compiled vars:  !0 = $amplitude
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function ridewave

Function applywax:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  applyWax
number of ops:  5
compiled vars:  !0 = $waxType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        CONCAT                                           ~1      'Ahh%2C+all+waxed+up+with+%27', !0
          2        CONCAT                                           ~2      ~1, '%27.++Ready+to+go%21'
          3        ECHO                                                     ~2
   14     4      > RETURN                                                   null

End of function applywax

Function paddleout:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  paddleOut
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'Paddling....'
   18     1      > RETURN                                                   null

End of function paddleout

Function screamshark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  screamShark
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'SHARK%21%21'
   22     1      > RETURN                                                   null

End of function screamshark

End of class Surfer.

Class RookieSurfer:
Function ridewave:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  rideWave
number of ops:  5
compiled vars:  !0 = $amplitude
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV_INIT                                        !0      1
   34     1        CONCAT                                           ~1      'Trying..+Trying..+to+ride+a+', !0
          2        CONCAT                                           ~2      ~1, 'ft.+wave%2C+whew%21'
          3        ECHO                                                     ~2
   35     4      > RETURN                                                   null

End of function ridewave

Function applywax:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  applyWax
number of ops:  5
compiled vars:  !0 = $waxType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        CONCAT                                           ~1      'Ahh%2C+all+waxed+up+with+%27', !0
          2        CONCAT                                           ~2      ~1, '%27.++Ready+to+go%21'
          3        ECHO                                                     ~2
   14     4      > RETURN                                                   null

End of function applywax

Function paddleout:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  paddleOut
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'Paddling....'
   18     1      > RETURN                                                   null

End of function paddleout

Function screamshark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  screamShark
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'SHARK%21%21'
   22     1      > RETURN                                                   null

End of function screamshark

End of class RookieSurfer.

Class ProSurfer:
Function ridewave:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  rideWave
number of ops:  5
compiled vars:  !0 = $amplitude
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   RECV_INIT                                        !0      8
   47     1        CONCAT                                           ~1      'Riding+a+', !0
          2        CONCAT                                           ~2      ~1, 'ft.+wave+backwards+doing+a+backflip%21'
          3        ECHO                                                     ~2
   48     4      > RETURN                                                   null

End of function ridewave

Function applywax:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  applyWax
number of ops:  5
compiled vars:  !0 = $waxType
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        CONCAT                                           ~1      'Ahh%2C+all+waxed+up+with+%27', !0
          2        CONCAT                                           ~2      ~1, '%27.++Ready+to+go%21'
          3        ECHO                                                     ~2
   14     4      > RETURN                                                   null

End of function applywax

Function paddleout:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  paddleOut
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'Paddling....'
   18     1      > RETURN                                                   null

End of function paddleout

Function screamshark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbKUd
function name:  screamShark
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'SHARK%21%21'
   22     1      > RETURN                                                   null

End of function screamshark

End of class ProSurfer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.32 ms | 1394 KiB | 13 Q