GithubHelp home page GithubHelp logo

PHP Catchable fatal error: Argument 1 passed to my_with_defined_object_parameters_function() must be an instance of yextension.so about php-cpp HOT 6 CLOSED

copernicamarketingsoftware avatar copernicamarketingsoftware commented on August 26, 2024
PHP Catchable fatal error: Argument 1 passed to my_with_defined_object_parameters_function() must be an instance of yextension.so

from php-cpp.

Comments (6)

EmielBruijntjes avatar EmielBruijntjes commented on August 26, 2024

Can you show us the smallest amount of source code that is needed to reproduce this problem?

from php-cpp.

dreamsxin avatar dreamsxin commented on August 26, 2024

I just tested the code here

https://github.com/CopernicaMarketingSoftware/PHP-CPP/tree/master/Examples/FunctionWithParameters

Ubuntu
PHP 5.5.7

git clone https://github.com/CopernicaMarketingSoftware/PHP-CPP.git
cd PHP-CPP
make
sudo make install
cd Examples/FunctionWithParameters
make
sudo make install
php functionwithparameters.php
Parameter 0: 1st
Parameter 1: 2nd
Parameter 2: 3rd
Parameter 3: 4th



Parameter 0: 21
Parameter 1: 42
63


The value of referenceVar: I am unchanged.

New value of referenceVar: I changed!


The array: a
The array: b
The array: c
The array: d



PHP Catchable fatal error:  Argument 1 passed to my_with_defined_object_parameters_function() must be an instance of yextension.so, instance of MyPhpClass given in /home/zhuzx/work/PHP-CPP/Examples/FunctionWithParameters/functionwithparameters.php on line 70

from php-cpp.

valmat avatar valmat commented on August 26, 2024

@dreamsxin If you want to test the library, run make test. The library is developing faster than the updated examples. It is therefore possible that the examples https://github.com/CopernicaMarketingSoftware/PHP-CPP/tree/master/Examples/ may not be compatible with the latest version of the library.

from php-cpp.

dreamsxin avatar dreamsxin commented on August 26, 2024

In FunctionWithParameters, I mainly want to test this:

ByVal(const char *name, const char *classname, bool nullable = false, bool required = true) : Argument(name, classname, nullable, required, false) {}

from php-cpp.

EmielBruijntjes avatar EmielBruijntjes commented on August 26, 2024

You found a couple of bugs. They have now been fixed. Thanks for your report.

from php-cpp.

dreamsxin avatar dreamsxin commented on August 26, 2024

Should, thanks for your work

from php-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.