source: src/router/php7/Zend/tests/numeric_string_errors.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 4.7 KB
Line 
1--TEST--
2Invalid numeric string E_WARNINGs and E_NOTICEs
3--FILE--
4<?php
5
6var_dump("2 Lorem" + "3 ipsum");
7var_dump("dolor" + "sit");
8echo "---", PHP_EOL;
9var_dump("5 amet," - "7 consectetur");
10var_dump("adipiscing" - "elit,");
11echo "---", PHP_EOL;
12var_dump("11 sed" * "13 do");
13var_dump("eiusmod" * "tempor");
14echo "---", PHP_EOL;
15var_dump("17 incididunt" / "19 ut");
16var_dump("labore" / "et");
17echo "---", PHP_EOL;
18var_dump("23 dolore" ** "29 magna");
19var_dump("aliqua." ** "Ut");
20echo "---", PHP_EOL;
21var_dump("31 enim" % "37 ad");
22try {
23    var_dump("minim" % "veniam,");
24} catch (DivisionByZeroError $e) {
25}
26echo "---", PHP_EOL;
27var_dump("41 minim" << "43 veniam,");
28var_dump("quis" << "nostrud");
29echo "---", PHP_EOL;
30var_dump("47 exercitation" >> "53 ullamco");
31var_dump("laboris" >> "nisi");
32echo "---", PHP_EOL;
33var_dump("59 ut" | 61);
34var_dump(67 | "71 aliquip");
35var_dump("ex" | 73);
36var_dump(79 | "ea");
37echo "---", PHP_EOL;
38var_dump("83 commodo" & 89);
39var_dump(97 & "101 consequat.");
40var_dump("Duis" & 103);
41var_dump(107 & "aute");
42echo "---", PHP_EOL;
43var_dump("109 irure" ^ 113);
44var_dump(127 ^ "131 dolor");
45var_dump("in" ^ 137);
46var_dump(139 ^ "reprehenderit");
47echo "---", PHP_EOL;
48var_dump(+"149 in");
49var_dump(+"voluptate");
50echo "---", PHP_EOL;
51var_dump(-"151 velit");
52var_dump(-"esse");
53?>
54--EXPECTF--
55
56Notice: A non well formed numeric value encountered in %s on line %d
57
58Notice: A non well formed numeric value encountered in %s on line %d
59int(5)
60
61Warning: A non-numeric value encountered in %s on line %d
62
63Warning: A non-numeric value encountered in %s on line %d
64int(0)
65---
66
67Notice: A non well formed numeric value encountered in %s on line %d
68
69Notice: A non well formed numeric value encountered in %s on line %d
70int(-2)
71
72Warning: A non-numeric value encountered in %s on line %d
73
74Warning: A non-numeric value encountered in %s on line %d
75int(0)
76---
77
78Notice: A non well formed numeric value encountered in %s on line %d
79
80Notice: A non well formed numeric value encountered in %s on line %d
81int(143)
82
83Warning: A non-numeric value encountered in %s on line %d
84
85Warning: A non-numeric value encountered in %s on line %d
86int(0)
87---
88
89Notice: A non well formed numeric value encountered in %s on line %d
90
91Notice: A non well formed numeric value encountered in %s on line %d
92float(0.89473684210526)
93
94Warning: A non-numeric value encountered in %s on line %d
95
96Warning: A non-numeric value encountered in %s on line %d
97
98Warning: Division by zero in %s on line %d
99float(NAN)
100---
101
102Notice: A non well formed numeric value encountered in %s on line %d
103
104Notice: A non well formed numeric value encountered in %s on line %d
105float(3.0910586430935E+39)
106
107Warning: A non-numeric value encountered in %s on line %d
108
109Warning: A non-numeric value encountered in %s on line %d
110int(1)
111---
112
113Notice: A non well formed numeric value encountered in %s on line %d
114
115Notice: A non well formed numeric value encountered in %s on line %d
116int(31)
117
118Warning: A non-numeric value encountered in %s on line %d
119
120Warning: A non-numeric value encountered in %s on line %d
121---
122
123Notice: A non well formed numeric value encountered in %s on line %d
124
125Notice: A non well formed numeric value encountered in %s on line %d
126int(%d)
127
128Warning: A non-numeric value encountered in %s on line %d
129
130Warning: A non-numeric value encountered in %s on line %d
131int(0)
132---
133
134Notice: A non well formed numeric value encountered in %s on line %d
135
136Notice: A non well formed numeric value encountered in %s on line %d
137int(0)
138
139Warning: A non-numeric value encountered in %s on line %d
140
141Warning: A non-numeric value encountered in %s on line %d
142int(0)
143---
144
145Notice: A non well formed numeric value encountered in %s on line %d
146int(63)
147
148Notice: A non well formed numeric value encountered in %s on line %d
149int(71)
150
151Warning: A non-numeric value encountered in %s on line %d
152int(73)
153
154Warning: A non-numeric value encountered in %s on line %d
155int(79)
156---
157
158Notice: A non well formed numeric value encountered in %s on line %d
159int(81)
160
161Notice: A non well formed numeric value encountered in %s on line %d
162int(97)
163
164Warning: A non-numeric value encountered in %s on line %d
165int(0)
166
167Warning: A non-numeric value encountered in %s on line %d
168int(0)
169---
170
171Notice: A non well formed numeric value encountered in %s on line %d
172int(28)
173
174Notice: A non well formed numeric value encountered in %s on line %d
175int(252)
176
177Warning: A non-numeric value encountered in %s on line %d
178int(137)
179
180Warning: A non-numeric value encountered in %s on line %d
181int(139)
182---
183
184Notice: A non well formed numeric value encountered in %s on line %d
185int(149)
186
187Warning: A non-numeric value encountered in %s on line %d
188int(0)
189---
190
191Notice: A non well formed numeric value encountered in %s on line %d
192int(-151)
193
194Warning: A non-numeric value encountered in %s on line %d
195int(0)
Note: See TracBrowser for help on using the repository browser.