Comments (2)
Kudos for great support!
from type-assert.
Looks like the special interfaces aren't supported by is_a :'(
hphpd> $x = []
hphpd> =$x instanceof Container
true
hphpd> =is_a($x, Container::class)
false
hphpd> =is_a('foo', Stringish::class)
false
from type-assert.
Related Issues (20)
- Improve error messages for nested errors HOT 1
- Evaluates empty arrays as NULL causing unexpected exceptions HOT 6
- Include key name in exceptions? HOT 1
- TypeAssert::matches_type_structure can't check collections of shapes HOT 1
- Remove tuple/shape coercion from assert path HOT 2
- Add traces to unsupportedtypeexception HOT 1
- Add describe() to typespecs HOT 3
- Add TypeTest\ namespace HOT 1
- Codegen TypeAssert and TypeCoerce namespaces from TypeSpec HOT 1
- Negative numbers don't coerce to ints
- Negative numbers don't coerce to floats HOT 2
- [BC broken] Exception type for `DictSpec::assertType()` changed between 3.6.1 and 3.6.2 HOT 3
- [BugReport] Automatic dict to shape coercion doesn't work inside of a KeyedContainer spec. HOT 2
- [ RFC ] Do we want to open up using custom TypeSpec<T>'s for the reified API's? HOT 4
- Automatic coercion should apply to varrays, darrays, vecs, and dicts HOT 2
- TypeSpec\of() doesn't take inner reified generics of arbitrary classes into account. HOT 2
- Remove all dict/vec/varray/darray/shape/tuple implicit conversions in assert path HOT 3
- Clean up references to varray and darray HOT 1
- QQ: Is it intentional that ShapeSpec drops unknown keys when coercing to a shape without optional fields? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from type-assert.