Author Topic: How do I return value from method (int, char) in PHP?  (Read 136 times)

Offline Martin

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
How do I return value from method (int, char) in PHP?
« on: November 17, 2016, 07:04:54 PM »
Hello, I would like to submit a question about the theme, how do i return value from method (int, char) in php? Thank you for giving me your help as soon as possible.



Offline Emmanuel

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
Re: value from method (int, char) in PHP?
« Reply #1 on: January 09, 2018, 06:55:15 PM »
Returning a value from a function back to the script involves populating the special, preallocated return_value container. For example, this returns an integer:

 PHP_FUNCTION(foo) {
    Z_LVAL_P(return_value) = 99;
    Z_TYPE_P(return_value) = IS_LONG;
}


 

Sitemap 1 2 3 4 5 6 7 8 9