Search
30 results · page 2 of 2
-
Jordi Boggiano ·
… INI entry, but it's still there. I agree that's a bad situation, but if a library uses strict types via declare, it is likely that it would also use scalar hints on its own method definitions. Not doing
-
Pierre Joye ·
… forgot to add foo (); in the example. Would it be possible to embed C code in a PHP function or method ? Yes, on the plan If yes, how do both codes access each other's data ? If foo() takes arguments …
-
David Zhuo ·
… eval('use Foo; $x = Foo->new; scalar $x->method'); will return a scalar to $k but: $k = p2p_eval('[$x->method]'); will return an array to $k and $k = p2p_eval('{$x->method}'); will return a hash to $k. note …
-
david ·
… and the next method call would return an array (the one after that would return scalar): Example: $x = new Perl("Test"); $y = $x->f(); // scalar context; perl_wantarray(); $y = $x->f(); // array context; $y = $x->f(); // scalar context; in m
-
Thomas Bley ·
… something like $str = new String('my_string_class'); echo $str->length(); But that's useless. It would be great if method calls on primitive types could be supported, like in Nikic' proof of concept (https://github.com/nikic/scalar_objects …
-
Rowan Tommins [IMSoP] ·
… makes the case for using a different keyword like extension much stronger since that is not the case for an extension. Everything on an extension is type-checked at compile time, save some edge cases with scalars. I'm not …
-
Stanislav Malyshev ·
Hi! So, what do you think of a set of interfaces that allow userland objects to be used as scalar types? Some simple examples in PHP here: https://gist.github.com/guiwoda/5d16c8fb97d29e476d20 We already have CastToString, it's __toString …
-
Florian Margaine ·
… Code is here: https://github.com/krakjoe/php-src/compare/addressof I think it makes more sense than a new method on all objects. You could use it for any kind of value: scalar, resource, object. Building an array of …
-
Adam Harvey ·
… been pretty stable.) Things that fall into that category for me include: size_t and int changes. Generics. Function and method naming rationalisation (whether through aliasing existing functions, or adding a new API through enabling method calls on scalar variables …
-
Ilia Alshanetsky ·
… will break nearly all existing code. We can provide means for authors as Hannes had pointed our earlier, of new extensions and if we choose to allow it internal methods/functions to have script type hints, but IMHO that only …