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!"); } public function killSharkWithBoard(){ echo("totally just sliced that shark in two!! booya!"); } } $rookie = new RookieSurfer; $rookie->applyWax("Candle Wax"); $rookie->paddleOut(); $rookie->rideWave(2); $rookie->screamShark(); $pro = new ProSurfer; $pro->applyWax("Sex Wax"); $pro->paddleOut(); $pro->rideWave(50); $pro->killSharkWithBoard();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/61tp7
function name:  (null)
number of ops:  27
compiled vars:  !0 = $rookie, !1 = $pro
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   NEW                                              $2      'RookieSurfer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   57     3        INIT_METHOD_CALL                                         !0, 'applyWax'
          4        SEND_VAL_EX                                              'Candle+Wax'
          5        DO_FCALL                                      0          
   58     6        INIT_METHOD_CALL                                         !0, 'paddleOut'
          7        DO_FCALL                                      0          
   59     8        INIT_METHOD_CALL                                         !0, 'rideWave'
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
   60    11        INIT_METHOD_CALL                                         !0, 'screamShark'
         12        DO_FCALL                                      0          
   62    13        NEW                                              $9      'ProSurfer'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !1, $9
   63    16        INIT_METHOD_CALL                                         !1, 'applyWax'
         17        SEND_VAL_EX                                              'Sex+Wax'
         18        DO_FCALL                                      0          
   64    19        INIT_METHOD_CALL                                         !1, 'paddleOut'
         20        DO_FCALL                                      0          
   65    21        INIT_METHOD_CALL                                         !1, 'rideWave'
         22        SEND_VAL_EX                                              50
         23        DO_FCALL                                      0          
   66    24        INIT_METHOD_CALL                                         !1, 'killSharkWithBoard'
         25        DO_FCALL                                      0          
         26      > RETURN                                                   1

Class Surfer:
Function ridewave:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/61tp7
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/61tp7
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/61tp7
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/61tp7
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/61tp7
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/61tp7
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/61tp7
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/61tp7
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/61tp7
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 killsharkwithboard:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/61tp7
function name:  killSharkWithBoard
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   51     0  E >   ECHO                                                     'totally+just+sliced+that+shark+in+two%21%21+booya%21'
   52     1      > RETURN                                                   null

End of function killsharkwithboard

Function applywax:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/61tp7
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/61tp7
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/61tp7
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:
140.22 ms | 1394 KiB | 13 Q