unlink of “%s” failed, file does not exist¶

Description¶

PHP reports failure when trying to remove a file that does not exists in a phar archive. This error message does not appear when using the regular filesystem, or the delete method on a phar object.

This error message is part of the stream system.

Example¶

<?php

try {
    $phar = new Phar('/tmp/myphar.phar');
    $phar->addFromString('foo.txt', 'hello');
    unset($phar);

    $phar = new Phar('/tmp/myphar.phar');
    unlink('phar:///tmp/myphar.phar/oops');
} catch (Exception $e) {
    // handle errors
    print $e->getMessage();
}
?>

Literal Examples¶

  • unlink of “oops” failed, file does not exist

Solutions¶

  • Check if the file is available before removing it, with Phar::offsetExists.

Related Error Messages¶

  • Entry %s does not exist and cannot be deleted

  • No such file or directory

Logo

All the PHP error messages, with explanations.

Navigation

Contents:

  • PHP Error Messages
    • “static::” is not allowed in compile-time constants
    • $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax
    • %d arguments are required, %d given
    • %s” returned as member variable from __sleep() but does not exist
    • “%s” will be interpreted as a class name. Did you mean “%s”? Write “%s”%s to suppress this warning
    • %s%s%s() does not accept unknown named parameters
    • %s%s%s(): Argument #%d%s%s%s must be passed by reference, value given
    • %s%s%s(): Return value must be of type %s, %s returned
    • %s():-Argument #%d%s%s%s cannot be passed by reference
    • %s() expects exactly 0 arguments, %d given
    • %s() has been disabled for security reasons
    • %s(): Argument #%d%s%s%s cannot be passed by reference
    • %s(): Argument #%d%s%s%s cannot not be passed by reference
    • %s(): Argument #%d%s%s%s could not be passed by reference
    • Implicitly marking parameter $%s as nullable is deprecated, the explicit nullable type must be used instead
    • %s(): never-returning %s must not implicitly return
    • %s(): Passing null to parameter #%d (%s) of type string is deprecated
    • %s(): Returning by reference from a void function is deprecated
    • %s %s cannot implement interface %s, extend Exception or Error instead
    • %s %s cannot implement previously implemented interface %s
    • %s %s inherits both %s::%s and %s::%s
    • %s %s must implement interface %s as part of either %s or %s
    • %s and %s define the same constant (%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed
    • %s cannot implement %s - it is not an interface
    • %s cannot use %s - it is not a trait
    • %s function %s::%s() cannot be declared private
    • %s is not supported on type %s
    • %s virtual property %s::$%s must not specify asymmetric visibility
    • %s::%s() has #[Override] attribute, but no matching parent method exists
    • %s::%s(): Return type must be %s when declared
    • %s::%s cannot override final constant %s::%s
    • %s::__sleep() should return an array only containing the names of instance-variables to serialize
    • %s::__toString() must return a string
    • ‘%s’ not in the ‘loop’ or ‘switch’ context
    • ‘%s’ operator accepts only positive integers
    • ‘%s’ operator with non-integer operand
    • ‘%s’ is an invalid class name
    • ‘goto’ into loop or switch statement is disallowed
    • ‘goto’ to undefined label ‘%s’
    • ‘namespace%s’ is an invalid class name
    • __autoload() is deprecated, use spl_autoload_register() instead
    • __autoload() is no longer supported, use spl_autoload_register() instead
    • __clone method called on non-object
    • __sleep should return an array only containing the names of instance-variables to serialize.
    • %s’ is not a valid mode for fopen
    • A class constant must not be called class. it is reserved for class name fetching
    • A function with return type must return a value
    • A never-returning %s must not return
    • A never-returning function must not return
    • A never-returning method must not return
    • A non-numeric value encountered
    • A non well formed numeric value encountered
    • A void %s must not return a value
    • Abstract property hook cannot have body
    • Access level to %s::%s must be %s (as in %s %s)%s
    • Access to undeclared static property %s::$%s
    • Access type for interface constant %s::%s must be public
    • Access type for interface method %s::%s() must be public
    • Accessing static property %s::$%s as non static
    • Accessing static trait property %s::$%s is deprecated, it should only be accessed on a class using the trait
    • Accessing static trait property %s::$%s is deprecated
    • An alias (%s) was defined for method %s(), but this method does not exist
    • An alias was defined for %s::%s but this method does not exist
    • An iterator cannot be used with foreach by reference
    • Argument #%d ($%s) must be of type %s, %s given
    • Argument #1 ($value) must contain at least one element
    • Array and string offset access syntax with curly braces is deprecated
    • Array and string offset access syntax with curly braces is no longer supported
    • Array callback has to contain indices 0 and 1
    • Array to string conversion
    • array_key_exists(): Argument #2 ($array) must be of type array, %s given
    • array_merge() does not accept unknown named parameters
    • array_merge() expects at least 1 parameter, 0 given
    • array_product(): Multiplication is not supported on type array
    • array_product(): Multiplication is not supported on type object
    • array_product(): Multiplication is not supported on type string
    • Assignments can only happen to writable values
    • Attempt to assign property “%s” on null
    • Attempt to read property “%s” on %s
    • Attempt to unset static property %s::$%s
    • Attribute “%s” cannot target %s (allowed targets: %s)
    • Attribute class “%s” not found
    • Automatic conversion of false to array is deprecated
    • b cannot implement a - it is not an interface
    • break operator accepts only positive integers
    • Call to %s %s::%s() from global scope
    • Call to %s %s::%s() from invalid
    • Call to %s method %s::%s() from %s%s
    • Call to a member function %s() on %s
    • Call to undefined function %s()
    • Call to undefined function each()
    • Call to undefined function exit()
    • Call to undefined function
    • Call to undefined method %s::%s()
    • Calling %s() on an object is deprecated
    • Calling get_class() without arguments is deprecated
    • Calling get_parent_class() without arguments is deprecated
    • Calling static trait method %s::%s is deprecated
    • Can’t inherit abstract function %s::%s() (previously declared abstract in %s)
    • Can’t use nullsafe operator in write context
    • Can only flip string and integer values, entry skipped
    • Can only throw objects
    • Cannot %s readonly property %s::$%s from %s%s
    • Cannot access %s const %s::%s
    • Cannot access %s constant %s::%s
    • Cannot access %s property %s::$%s
    • Cannot access offset of type %s in isset or empty
    • Cannot access offset of type %s on %s
    • Cannot access parent:: when current class scope has no parent
    • Cannot access parent:: when no class scope is active
    • Cannot access self:: when no class scope is active
    • Cannot access static:: when no class scope is active
    • Cannot access trait constant %s::%s directly
    • Cannot acquire reference to $GLOBALS
    • Cannot acquire reference to readonly property %s::$%s
    • Cannot add element to the array as the next element is already occupied
    • Cannot apply #[AllowDynamicProperties] to enum %s
    • Cannot apply #[AllowDynamicProperties] to interface %s
    • Cannot apply #[AllowDynamicProperties] to readonly class %s
    • Cannot apply #[AllowDynamicProperties] to trait %s
    • Cannot assign %s to class constant %s::%s of type
    • Cannot assign %s to property %s::$%s of type %s
    • Cannot assign an empty string to a string offset
    • Cannot assign reference to non referenceable value
    • Cannot auto-initialize an array inside property %s::$%s of type %s
    • cannot be a class constant
    • cannot be LC_ALL
    • cannot be null when argument #1 ($objectOrMethod) is an object
    • Cannot bind an instance to a static closure
    • Cannot call constructor
    • Cannot combine named arguments and argument unpacking
    • Cannot create dynamic property %s::$%s
    • Cannot create reference to property %s::$%s
    • Cannot declare hooks for static property
    • Cannot declare promoted property in an abstract constructor
    • Cannot declare promoted property outside a constructor
    • Cannot declare self-referencing constant
    • Cannot declare variadic promoted property
    • Cannot indirectly modify readonly property %s::$%s
    • Cannot inherit previously-inherited or override constant %s from interface %s
    • Cannot instantiate enum %s
    • Cannot instantiate interface %s
    • Cannot instantiate trait %s
    • Cannot load module “%s” because required module “%s” is not loaded
    • Cannot make non abstract method %s::%s() abstract in class %s
    • Cannot make non static method %s::%s() static in class %s
    • Cannot make static method %s::%s() non static in class %s
    • Cannot mix keyed and unkeyed array entries in assignments
    • Cannot modify readonly property %s::$%s
    • Cannot override final %s::%s() with %s::%s()
    • Cannot override final property %s::$%s
    • Cannot override final property hook %s::%s()
    • Cannot pass parameter %d by reference
    • Cannot perform bitwise not on %s
    • Cannot re-assign $this
    • Cannot re-assign auto-global variable %s
    • Cannot redeclare %s() (previously declared in %s:%d)
    • Cannot redeclare %s property %s::$%s as %s %s::$%s
    • Cannot redeclare %s::%s()
    • Cannot redeclare function %s() (previously declared in %s:%d)
    • Cannot redeclare property hook
    • Cannot redefine class constant
    • Cannot specify default value for virtual hooked property
    • Cannot throw objects that do not implement Throwable
    • Cannot unpack array with string keys
    • Cannot unset $this
    • Cannot unset hooked property %s::$%s
    • Cannot unset offset in a non-array variable
    • Cannot unset readonly property %s::$%s
    • Cannot unset string offsets
    • Cannot use “%s” as a type name as it is reserved
    • Cannot use “%s” when no class scope is active
    • Cannot use “abstract” as method modifier in trait alias
    • Cannot use “static” when no class scope is active
    • Cannot use %s as default value for parameter $%s of type %s
    • Cannot use %s as default value for property %s::$%s of type %s
    • Cannot use ‘abstract’ as constant modifier
    • Cannot use ‘abstract’ as method modifier
    • Cannot use ‘final’ as constant modifier
    • Cannot use ‘final’ as method modifier
    • Cannot use ‘mixed’ as class name as it is reserved
    • Cannot use ‘namespace’ as namespace name
    • Cannot use ‘never’ as class name as it is reserved
    • Cannot use ‘readonly’ as %s modifier
    • Cannot use ‘readonly’ as method modifier
    • Cannot use ‘static’ as constant modifier
    • Cannot use ‘static’ as method modifier
    • Cannot use ::class with dynamic class name
    • Cannot use [] for reading
    • Cannot use a scalar value as an array
    • Cannot use empty array elements in arrays
    • Cannot use empty array entries in keyed array assignment
    • Cannot use empty list
    • Cannot use isset() on the result of an expression (you can use “null !== expression” instead)
    • Cannot use lexical variable %s as a parameter name
    • Cannot use list() as standalone expression
    • Cannot use object of type %s as array
    • Cannot use object of type stdClass as array
    • Cannot use positional argument after argument unpacking
    • Cannot use positional argument after named argument during unpacking
    • Cannot use positional argument after named argument
    • Cannot use string offset as an array
    • Cannot use string offset as an object
    • Cannot use temporary expression in write context
    • Cannot use the %s modifier on a %s
    • Cannot use the abstract modifier on a property hook
    • Cannot use the abstract modifier on a property
    • Property cannot be both final and private
    • Cannot use the static modifier on a property hook
    • Cannot use try without catch or finally
    • Cannot use variable $%S twice
    • Case %s of backed enum %s must have a value
    • Case %s::%s does not exist
    • Case can only be used in enums
    • Class “%s” not found
    • Class %s cannot extend %s %s
    • Class %s cannot extend final class %s
    • Class %s cannot implement both Iterator and IteratorAggregate at the same time
    • Class %s cannot implement previously implemented interface %s
    • Class %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods
    • Class %s does not have a property named %s
    • Class %s is not a trait, Only traits may be used in ‘as’ and ‘insteadof’ statements
    • Class %s must implement interface %s as part of either %s or %s
    • Class constant %s::%s cannot have type %s
    • Class declarations may not be nested
    • Classes must be first marked as attribute before being able to be registered as internal attribute class
    • Constant %s already defined
    • Constant %s is deprecated
    • Constant %s::%s is deprecated
    • Constant expression contains invalid operations
    • Constructor %s::%s() cannot declare a return type
    • Constructors cannot declare a return type
    • contains an invalid cURL option
    • continue” targeting switch is equivalent to “break
    • continue operator accepts only positive integers
    • Could not check compatibility between %s and %s, because class %s is not available
    • Could not find trait %s
    • Couldn’t open stream %s
    • Couldn’t open stream: %s
    • Creating default object from empty value
    • Creation of dynamic property %s::$%s is deprecated
    • DateTimeInterface can’t be implemented by user classes
    • Declaration of %s must be compatible with %s
    • Declaration of %s::%s() must be compatible with %s::%s()
    • Declaration of case-insensitive constants is no longer supported
    • Decrement on type bool has no effect, this will change in the next major version of PHP
    • Decrement on type null has no effect, this will change in the next major version of PHP
    • Default value for parameters with a %s type can only be %s or NULL
    • Default value for property of type int may not be null. Use the nullable type ?int to allow null default value
    • define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported
    • define(): Declaration of case-insensitive constants is deprecated
    • Defining a custom assert() function is not allowed,
    • Delimiter must not be alphanumeric, backslash, or NUL byte
    • Delimiter must not be alphanumeric, backslash, or NUL
    • Delimiter must not be alphanumeric or backslash
    • Destructors cannot declare a return type
    • Disabling session.use_only_cookies INI setting is deprecated
    • Division of PHP_INT_MIN by -1 is not an integer
    • Duplicate declaration of static variable $%s
    • Duplicate named parameter $%s
    • Duplicate type %s is redundant
    • Duplicate value in enum %s for cases %s and %s
    • Dynamic class names are not allowed in compile-time class constant references
    • Empty delimiter
    • Enabling session.use_trans_sid INI setting is deprecated
    • Entry %s does not exist and cannot be deleted
    • Enum “%s” not found
    • Enum %s cannot implement the Serializable interface
    • Enum %s cannot include magic method %s
    • Enum %s cannot include properties
    • Enum backing type must be int or string
    • Enum case type %s does not match enum backing type %s
    • Enum case value must be compile-time evaluatable
    • Error at offset %zd of %zd
    • exponent cannot have a fractional part
    • Extra data starting at offset %d of %zd bytes
    • Failed to open stream from socketpair
    • Fetching properties on non-enums in constant expressions is not allowed
    • FFI API is restricted by “ffi.enable” configuration directive
    • Filename cannot be empty
    • foreach() argument must be of type array|object
    • func_get_arg() cannot be called from the global scope
    • func_get_args() cannot be called from the global scope
    • func_num_args() must be called from a function context
    • Function libxml_disable_entity_loader() is deprecated since 8.0, as external entity loading is disabled by default
    • Function name must be a string
    • Generator return type must be a supertype of Generator
    • Generators cannot return values using “return”
    • get_called_class() must be called from within a class
    • get_defined_functions(): Setting $exclude_disabled to false has no effect
    • Handling Base64 via mbstring is deprecated; use base64_encode/base64_decode instead
    • Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity
    • Handling QPrint via mbstring is deprecated; use quoted_printable_encode/quoted_printable_decode
    • Handling Uuencode via mbstring is deprecated; use convert_uuencode/convert_uudecode instead
    • has #[Override] attribute, but no matching parent method exists
    • Hooked properties cannot be readonly
    • Illegal class name
    • Illegal offset type in isset or empty
    • Illegal offset type in unset
    • Illegal offset type
    • illegal string offset
    • Implicit conversion from float-string “%s” to int loses precision
    • Increment on type bool has no effect, this will change in the next major version of PHP
    • Index invalid or out of range
    • Indirect modification of %s::$%s is not allowed
    • Indirect modification of overloaded element of %s has no effect
    • Indirect modification of overloaded property %s::$%s has no effect
    • instanceof expects an object instance, constant given
    • Interface “%s” not found
    • Interface %s cannot contain non abstract method %s()
    • Interfaces may not include properties
    • Interfaces may only include hooked properties
    • Invalid argument supplied for foreach()
    • Invalid characters passed for attempted conversion, these have been ignored
    • Invalid numeric literal
    • Invalid UTF-8 codepoint escape
    • Invalid UTF-8 codepoint escape: Codepoint too large
    • ‘%s’ is an invalid class name
    • is an invalid offset
    • is not a valid codepoint
    • jump into a finally block is disallowed
    • jump out of a finally block is disallowed
    • Keys must be of type int|string during array unpacking
    • Label ‘%s’ already defined
    • Match expressions may only contain one default arm
    • Maximum depth of %d exceeded. The depth limit can be changed using the max_depth unserialize() option
    • Maximum execution time of %d second%s exceeded
    • Method %s::%s() cannot be static
    • Method %s::%s() cannot declare a return type
    • Method %s::%s() must be static
    • Method %s::__toString() must not throw an exception, caught %s: %s
    • Method name must be a string
    • Methods with the same name as their class will not be constructors in a future version of PHP; %s has a deprecated constructor
    • Multiple access type modifiers are not allowed
    • Multiple readonly modifiers are not allowed
    • Multiple static modifiers are not allowed
    • must be a finite value
    • must be a user-defined class name, internal class name given
    • must be a valid class name, %s given
    • must be a valid comparison operator
    • must be a valid encoding, “%s” given
    • must be a valid method name
    • must be a valid rounding mode (RoundingMode::*)
    • %s(): Argument #%d ($%s) must be contained in argument #%d ($%s)
    • must be of type %s, %s given
    • must be one of PGSQL_ASSOC, PGSQL_NUM, or PGSQL_BOTH
    • must be one of PGSQL_NOTICE_LAST, PGSQL_NOTICE_ALL, or PGSQL_NOTICE_CLEAR
    • must contain at least one element
    • Must not use parent::$%s::%s() in a different property ($%s)
    • Must not use parent::$%s::%s() in a different property hook (%s)
    • Must not use parent::$%s::%s() outside a property hook
    • Named parameter $%s overwrites previous argument
    • Namespace declarations cannot be nested
    • needle is not a string or an integer
    • Negative power of zero
    • Nesting level too deep - recursive dependency?
    • never cannot be used as a parameter type
    • never-returning function must not implicitly return
    • New expressions are not supported in this context
    • No code may exist outside of namespace {}
    • No ending delimiter ‘%c’ found
    • No such file or directory
    • Non-abstract method %s::%s() must contain body
    • Non-abstract property hook must have a body
    • Non-enum class %s cannot implement interface %s
    • Non-static method %s::%s() cannot be called statically
    • Non-static method %s::%s() should not be called statically
    • Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
    • Object of class %s could not be converted to %s
    • Object of class %s could not be converted to bool
    • Object of class %s could not be converted to float
    • Object of class %s could not be converted to int
    • Object of class %s could not be converted to string
    • Object of type %s has not been correctly initialized by calling parent::__construct() in its constructor
    • Object of type %s is not callable
    • Octal escape sequence overflow %s is greater than 377
    • Offset not contained in string.
    • Only arrays and Traversables can be unpacked
    • Only arrays can be unpacked in constant expression
    • Only hooked properties may be declared abstract
    • Only internal classes can be registered as compiler attribute
    • Only the first byte will be assigned to the string offset
    • Only variable references should be returned by reference
    • Only variable references should be yielded by reference
    • Only variables can be passed by reference
    • Only variables should be passed by reference
    • Optional parameter %s declared before required parameter %s is implicitly treated as a required parameter
    • Parameter %d must be passed by reference
    • Parameter uses ‘parent’ as type hint although class does not have a parent!
    • Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead
    • Passing false or null is deprecated since 8.4
    • Passing the encoding as third parameter is deprecated. Use an explicit zero offset
    • Path cannot be empty
    • Path must not be empty
    • Power of base 0 and negative exponent is deprecated
    • Private constant %s::%s cannot be final as it is not visible to other classes
    • Private methods cannot be final as they are never overridden by other classes
    • Property %s does not exist
    • Property %s::$%s cannot have type %s
    • Property %s::$%s does not exist
    • Property cannot be both final and private
    • Property hook cannot be both abstract and private
    • Property hook cannot be both final and private
    • Property hook list must not be empty
    • Property with asymmetric visibility %s::$%s must have type
    • Property x::$p cannot have type void
    • Readonly class %s cannot use trait with a non-readonly property %s::$%s
    • Readonly class Bar cannot extend non-readonly class Foo
    • Readonly property %s::$%s cannot have default value
    • Readonly property %s::$%s must have type
    • Recursion detected
    • Redefinition of parameter $%s
    • Required parameter $%s follows optional parameter $%s
    • Required Trait %s wasn’t added to %s
    • Return type of %s::%s() should either be compatible with %s::%s(): mixed
    • Return value of %s%s%s() must %s%s%s, %s%s returned
    • Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero
    • Returning bool from comparison function is deprecated
    • Returning by reference from a void function is deprecated
    • Security level must be one of “noAuthNoPriv”, “authNoPriv”, or “authPriv”
    • Security protocol must be one of “AES128”, or “AES E_ERROR
    • Security protocol must be one of “DES”, “AES128”, or “AES E_ERROR
    • Spread operator is not supported in assignments
    • Static function %s%s%s() cannot be abstract
    • Static property %s::$%s cannot be readonly
    • strict_types declaration must be the very first statement in the script
    • Switch statements may only contain one default clause
    • syntax error, unexpected ')', expecting '='
    • syntax error, unexpected ‘)’, expecting ‘|’ or variable (T_VARIABLE)
    • syntax error, unexpected ‘)’, expecting variable (T_VARIABLE)
    • syntax error, unexpected ‘,’
    • syntax error, unexpected ‘-’, expecting ‘=’
    • syntax error, unexpected ‘::’, expecting ‘(’
    • syntax error, unexpected ‘::’ (T_PAAMAYIM_NEKUDOTAYIM), expecting ‘;’ or ‘,’
    • syntax error, unexpected ‘;’, expecting ‘[’
    • syntax error, unexpected ‘[’, expecting ‘;’ or ‘,’
    • syntax error, unexpected ‘elseif’
    • syntax error, unexpected ‘match’
    • syntax error, unexpected ‘throw’ (T_THROW)
    • syntax error, unexpected ‘|’, expecting variable (T_VARIABLE)
    • syntax error, unexpected end of file
    • syntax error, unexpected fully qualified name “%s”, expecting “function” or “const”
    • syntax error, unexpected fully qualified name “%s”, expecting “{”
    • syntax error, unexpected identifier “%s”, expecting “)”
    • syntax error, unexpected identifier “%s”, expecting “,” or “;”
    • syntax error, unexpected identifier “%s”, expecting “]”
    • syntax error, unexpected identifier “%s”, expecting “function” or “const”
    • syntax error, unexpected identifier “%s”, expecting “function”
    • syntax error, unexpected identifier “%s”, expecting “{”
    • syntax error, unexpected identifier “%s”, expecting variable or “$”
    • syntax error, unexpected identifier “%s”, expecting variable
    • syntax error, unexpected identifier “%s”
    • syntax error, unexpected integer “%s”, expecting “)”
    • syntax error, unexpected namespaced name “%s”, expecting “function”
    • syntax error, unexpected single quoted string “%s”, expecting “)”
    • syntax error, unexpected string content
    • syntax error, unexpected token “#[”, expecting “,” or “;”
    • syntax error, unexpected token “#[”, expecting “]”
    • syntax error, unexpected token “%”
    • syntax error, unexpected token “%s”, expecting identifier
    • syntax error, unexpected token “&”, expecting end of file
    • syntax error, unexpected token “&”
    • syntax error, unexpected token “(”, expecting “::”
    • syntax error, unexpected token “(”, expecting identifier or variable or “{” or “$”
    • syntax error, unexpected token “(”, expecting variable
    • syntax error, unexpected token “(”
    • syntax error, unexpected token “(int)”
    • syntax error, unexpected token “)”, expecting “=”
    • syntax error, unexpected token “)”, expecting “function” or “fn” or “static” or “#[”
    • syntax error, unexpected token “)”
    • syntax error, unexpected token “*”
    • syntax error, unexpected token “,”, expecting “)”
    • syntax error, unexpected token “,”, expecting “]”
    • syntax error, unexpected token “,”, expecting variable or “$”
    • syntax error, unexpected token “,”, expecting variable
    • syntax error, unexpected token “,”
    • syntax error, unexpected token “->”, expecting “,” or “;”
    • syntax error, unexpected token “->”
    • syntax error, unexpected token “:”, expecting “)”
    • syntax error, unexpected token “:”, expecting “]”
    • syntax error, unexpected token “:”
    • syntax error, unexpected token “::”, expecting “,” or “;”
    • syntax error, unexpected token “::”, expecting “:”
    • syntax error, unexpected token “::”
    • syntax error, unexpected token “;”, expecting “)”
    • syntax error, unexpected token “;”, expecting “,” or “)”
    • syntax error, unexpected token “;”, expecting “->” or “?->” or “[”
    • syntax error, unexpected token “;”, expecting “->” or “?->” or “{” or “[”
    • syntax error, unexpected token “;”, expecting “]”
    • syntax error, unexpected token “;”, expecting “function” or “fn” or “static” or “#[”
    • syntax error, unexpected token “;”, expecting “{”
    • syntax error, unexpected token “;”, expecting identifier
    • syntax error, unexpected token “;”
    • syntax error, unexpected token “<<”
    • syntax error, unexpected token “=”, expecting identifier or variable or “{” or “$”
    • syntax error, unexpected token “=”, expecting identifier
    • syntax error, unexpected token “=”, expecting variable
    • syntax error, unexpected token “=”
    • syntax error, unexpected token “?”
    • syntax error, unexpected token “?->”, expecting “,” or “;”
    • syntax error, unexpected token “?->”
    • syntax error, unexpected token “??”
    • syntax error, unexpected token “]”
    • syntax error, unexpected token “__NAMESPACE__”, expecting “(”
    • syntax error, unexpected token “as”
    • syntax error, unexpected token “break”
    • syntax error, unexpected token “class”, expecting-“]”
    • syntax error, unexpected token “continue”
    • syntax error, unexpected token “exit”
    • syntax error, unexpected token “extends”, expecting “{”
    • syntax error, unexpected token “extends”, expecting identifier
    • syntax error, unexpected token “extends”
    • syntax error, unexpected token “final”, expecting “(”
    • syntax error, unexpected token “if”, expecting “)”
    • syntax error, unexpected token “if”, expecting “]”
    • syntax error, unexpected token “if”
    • syntax error, unexpected token “implements”
    • syntax error, unexpected token “match”
    • syntax error, unexpected token “namespace”, expecting “{”
    • syntax error, unexpected token “namespace”
    • syntax error, unexpected token “new”, expecting “)”
    • syntax error, unexpected token “private”, expecting “(”
    • syntax error, unexpected token “private”, expecting “)”
    • syntax error, unexpected token “private”, expecting “{”
    • syntax error, unexpected token “protected”, expecting “{”
    • syntax error, unexpected token “public”, expecting “{”
    • syntax error, unexpected token “public”
    • syntax error, unexpected token “use”, expecting “,” or “;”
    • syntax error, unexpected token “use”, expecting “{”
    • syntax error, unexpected token “use”
    • syntax error, unexpected token “{”, expecting “,” or “;”
    • syntax error, unexpected token “{”, expecting variable
    • syntax error, unexpected token “{”
    • syntax error, unexpected token “}”, expecting “;” or “{”
    • syntax error, unexpected token “}”
    • syntax error, unexpected variable “%s”, expecting “(”
    • The “Generator” class is reserved for internal use and cannot be manually instantiated
    • the $escape parameter must be provided as its default value will change
    • The (real) cast operator has been removed, use (float) instead. Both operator looked like synonyms, and were providing the same feature.
    • The (real) cast is deprecated, use (float) instead
    • The (unset) cast is deprecated
    • The (unset) cast is no longer supported
    • The behavior of unparenthesized expressions containing both ‘.’ and ‘+’/’-’ will change in PHP 8: ‘+’/’-’ will take a higher precedence
    • The behavior of unparenthesized expressions containing both ‘.’ and ‘<<’/’>>’ will change in PHP 8: ‘<<’/’>>’ will take a higher precedence
    • The behavior of unparenthesized expressions containing both ‘.’ and ‘>>’/’<<’ will change in PHP 8: ‘<<’/’>>’ will take a higher precedence
    • The each() function is deprecated. This message will be suppressed on further calls
    • The magic method %s::%s() must have public visibility
    • The parent constructor was not called: the object is in an invalid state
    • Too few arguments to function %s%s%s(), %d passed and %s %d expected
    • Too few arguments to function %s%s%s(), %d passed and %s %d
    • Too few arguments to function %s%s%s(), %d passed in %s on line %d and %s %d expected
    • Too few arguments
    • Trait “%s” not found
    • Trait method %s::%s has not been applied as %s::%s
    • Traits cannot have constants
    • Trying to access array offset on %s
    • Trying to clone an uncloneable object of class %s
    • Trying to invoke %s method %s::%s() from scope %s
    • Type %c: unknown format code
    • Type %s contains both iterable and array, which is redundant
    • Type contains both true and false, bool must be used instead
    • Type declaration ‘%s’ must be unqualified
    • Type must be a single character
    • Type of %s::$%s must be %s%s (as in class %s)
    • Type of %s::$%s must not be defined (as in class %s)
    • Typed property %s::$%s must not be accessed before initialization
    • Typed static property %s::$%s must not be accessed before initialization
    • Unbacked enum %s cannot be converted to a string
    • Unclosed '(' does not match ']'
    • Unclosed ‘(’
    • Unclosed ‘[’
    • Unclosed ‘{’
    • Undefined array key
    • Undefined class constant ‘%s::%s’
    • Undefined constant “%s”
    • Undefined constant %s::%s
    • Undefined offset
    • Undefined property %s::$%s
    • Undefined variable $%S
    • Undefined variable
    • Unhandled match case %s
    • Uninitialized string offset
    • Unknown filter with ID
    • Unknown format specifier “%c
    • Unknown hook “%s” for property %s::$%s, expected “get” or “set”
    • Unknown named parameter $%s
    • Unknown or bad format (%s)
    • unlink of “%s” failed, file does not exist
    • Unmatched ‘)’
    • Unmatched ‘]’
    • Unmatched ‘}’
    • Unparenthesized a ? b : c ? d : e is not supported.
    • Unserializing the ‘S’ format is deprecated
    • Unsupported declare '%s'
    • Unsupported operand types
    • Unterminated comment starting line %d
    • Use of “parent” in callables is deprecated
    • Use of “self” in callables is deprecated
    • Use of “static” in callables is deprecated
    • Using “_” as %s is deprecated since 8.4
    • Using $this when not in object context
    • Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead
    • Using in strings is deprecated, use {$var} instead
    • Using array_key_exists() on objects is deprecated.
    • Value of type %s is not callable
    • Visibility of property %s::$%s must not be weaker than set visibility
    • void cannot be used as a parameter type
    • Wrong encoding, conversion from “%s” to “%s” is not allowed
  • Syntax errors
  • Tag index
  • Features index

Related Topics

  • Documentation overview
    • PHP Error Messages
      • Previous: Unknown or bad format (%s)
      • Next: Unmatched ‘)’
©2023-2025, Damien Seguy - Exakat. | Powered by Sphinx 8.2.3 & Alabaster 1.0.0 | Page source