struct PHP::Any
Defined in:
php_serializer/any.crConstructors
Instance Method Summary
- #==(other : PHP::Any)
-
#==(other)
Returns
true
if this struct is equal to other. - #[](key : Int | String) : PHP::Any
- #[]?(key : Int | String) : PHP::Any | Nil
- #as_bool : Bool
- #as_bool? : Bool | Nil
- #as_f : Float64
- #as_f32 : Float32
- #as_f32? : Float32 | Nil
- #as_f? : Float64 | Nil
- #as_h : Hash(Int32 | String, PHP::Any)
- #as_h? : Hash(Int32 | String, PHP::Any) | Nil
- #as_i : Int32
- #as_i64 : Int64
- #as_i64? : Int64 | Nil
- #as_i? : Int32
- #as_nil : Nil
- #as_o : PHP::Object
- #as_o? : PHP::Object | Nil
- #as_s : String
- #as_s? : String | Nil
- #inspect(*args, **options)
- #inspect(*args, **options, &)
- #pretty_print(*args, **options)
- #pretty_print(*args, **options, &)
- #raw : Type
- #size : Int32
- #to_json(*args, **options)
- #to_json(*args, **options, &)
- #to_s(*args, **options)
- #to_s(*args, **options, &)
Instance methods inherited from class Object
to_php_serialized(io : IO)to_php_serialized to_php_serialized
Constructor Detail
Instance Method Detail
def ==(other)
#
Description copied from struct Struct
Returns true
if this struct is equal to other.
Both structs' instance vars are compared to each other. Thus, two structs are considered equal if each of their instance variables are equal. Subclasses should override this method to provide specific equality semantics.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p2 = Point.new 1, 2
p3 = Point.new 3, 4
p1 == p2 # => true
p1 == p3 # => false