anhnhan / anh-php-src Goto Github PK
View Code? Open in Web Editor NEWThis project forked from php/php-src
The PHP Interpreter - planned modifications for my needs
Home Page: http://www.php.net
License: Other
This project forked from php/php-src
The PHP Interpreter - planned modifications for my needs
Home Page: http://www.php.net
License: Other
$val = $obj?>member($param1)?>property;
The above code would be equivalent with
$val = null;
if ($obj != null)
{
$val = $obj->member($param1);
if ($val != null)
// ...
}
so parameters to skipped operations would be skipped.
function (array $array, callable $fun)
{ ...}
$foo = ["bar", "baz"];
$result = $foo `$array` function ($_) { return $_; }
Two Three options for implementing them:
MethodNotFound
Instead of instantly failing when no method could be resolved, search in the available function space first before deciding to fail.
To consider: Add this behavior to scalars and arrays, too?
__call
implementationImplement a default __call
on the base object type (does such one exist?) that falls back to calling the extension method.
Disadvantage: Not possible for scalars / array.
->
for invoking extension methods:>
would look pretty sexy.
Well, we can't do it too native. Scan all symbols on startup, and register them with a global annotations (or even metamodel?) manager (for now, registry).
class Foo
{
[someAnnotation("bar")]
public function baz() {}
}
$annotations = annotations("Foo::baz");
var_dump($annotations);
// [ someAnnotation("bar") ] as var_dump output
This has time, though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.