3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limit = [null, null]; var_dump(min($limit)); $limit = [null]; var_dump(min($limit)); $limit = [5]; var_dump(min($limit)); $limit = [5, null]; var_dump(min($limit)); $limit = [null, 5]; var_dump(min($limit)); $limit = [null, null]; $limit = array_filter($limit, 'strlen'); var_dump(min($limit)); $limit = [null]; $limit = array_filter($limit, 'strlen'); var_dump(min($limit)); $limit = [5]; $limit = array_filter($limit, 'strlen'); var_dump(min($limit)); $limit = [5, null]; $limit = array_filter($limit, 'strlen'); var_dump(min($limit)); $limit = [null, 5]; $limit = array_filter($limit, 'strlen'); var_dump(min($limit));
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
NULL NULL int(5) NULL NULL Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/dpe8m on line 21 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/dpe8m on line 21 Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /in/dpe8m:22 Stack trace: #0 /in/dpe8m(22): min(Array) #1 {main} thrown in /in/dpe8m on line 22
Process exited with code 255.
Output for 8.0.0 - 8.0.30
NULL NULL int(5) NULL NULL Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /in/dpe8m:22 Stack trace: #0 /in/dpe8m(22): min(Array) #1 {main} thrown in /in/dpe8m on line 22
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
NULL NULL int(5) NULL NULL Warning: min(): Array must contain at least one element in /in/dpe8m on line 22 bool(false) Warning: min(): Array must contain at least one element in /in/dpe8m on line 26 bool(false) int(5) int(5) int(5)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/dpe8m on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/dpe8m on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/dpe8m on line 3
Process exited with code 255.

preferences:
245.95 ms | 401 KiB | 345 Q