Test: /ext/standard/tests/strings/strcmp.phpt - Version 5.4.5-dev    

There is 1 diff reported by users for this test.

Count Diff
1 (100%)
139+ - strcmp of 'acd' and 'accc' is =>
139- - strcmp of 'acd' and 'accc' is => int(%d)
140- - strcmp of 'acd' and 'acd' is => int(0)
141- - strcmp of 'acd' and '?acc' is => int(%d)
142- - strcmp of 'acd' and 'acc!' is => int(%d)
143- - strcmp of 'acd' and '$!acc' is => int(%d)
144- - strcmp of 'acd' and ';acc' is => int(%d)
145-
146- Iteration 5
147- - strcmp of '?acc' and 'acc' is => int(-%d)
148- - strcmp of '?acc' and 'Acc' is => int(-%d)
149- - strcmp of '?acc' and 'ac' is => int(-%d)
150- - strcmp of '?acc' and 'accc' is => int(-%d)
151- - strcmp of '?acc' and 'acd' is => int(-%d)
152- - strcmp of '?acc' and '?acc' is => int(0)
153- - strcmp of '?acc' and 'acc!' is => int(-%d)
154- - strcmp of '?acc' and '$!acc' is => int(%d)
155- - strcmp of '?acc' and ';acc' is => int(%d)
156-
157- Iteration 6
158- - strcmp of 'acc!' and 'acc' is => int(%d)
159- - strcmp of 'acc!' and 'Acc' is => int(%d)
160- - strcmp of 'acc!' and 'ac' is => int(%d)
161- - strcmp of 'acc!' and 'accc' is => int(-%d)
162- - strcmp of 'acc!' and 'acd' is => int(-%d)
163- - strcmp of 'acc!' and '?acc' is => int(%d)
164- - strcmp of 'acc!' and 'acc!' is => int(0)
165- - strcmp of 'acc!' and '$!acc' is => int(%d)
166- - strcmp of 'acc!' and ';acc' is => int(%d)
167-
168- Iteration 7
169- - strcmp of '$!acc' and 'acc' is => int(-%d)
170- - strcmp of '$!acc' and 'Acc' is => int(-%d)
171- - strcmp of '$!acc' and 'ac' is => int(-%d)
172- - strcmp of '$!acc' and 'accc' is => int(-%d)
173- - strcmp of '$!acc' and 'acd' is => int(-%d)
174- - strcmp of '$!acc' and '?acc' is => int(-%d)
175- - strcmp of '$!acc' and 'acc!' is => int(-%d)
176- - strcmp of '$!acc' and '$!acc' is => int(0)
177- - strcmp of '$!acc' and ';acc' is => int(-%d)
178-
179- Iteration 8
180- - strcmp of ';acc' and 'acc' is => int(-%d)
181- - strcmp of ';acc' and 'Acc' is => int(-%d)
182- - strcmp of ';acc' and 'ac' is => int(-%d)
183- - strcmp of ';acc' and 'accc' is => int(-%d)
184- - strcmp of ';acc' and 'acd' is => int(-%d)
185- - strcmp of ';acc' and '?acc' is => int(-%d)
186- - strcmp of ';acc' and 'acc!' is => int(-%d)
187- - strcmp of ';acc' and '$!acc' is => int(%d)
188- - strcmp of ';acc' and ';acc' is => int(0)
189-
190- *** comparing the strings in an
191- Array
192- (
193- [0] => 1
194- [1] => 0
195- [2] => 0
196- [3] => -1
197- [4] => -1
198- [5] =>
199- [6] =>
200- [7] => 1
201- [8] =>
202- [9] => string
203- )
204-
205- Iteration 0
206- - strcmp of '1' and '1' is => int(0)
207- - strcmp of '1' and '0' is => int(%d)
208- - strcmp of '1' and '0' is => int(%d)
209- - strcmp of '1' and '-1' is => int(%d)
210- - strcmp of '1' and '-1' is => int(%d)
211- - strcmp of '1' and '' is => int(%d)
212- - strcmp of '1' and '' is => int(%d)
213- - strcmp of '1' and '1' is => int(0)
214- - strcmp of '1' and '' is => int(%d)
215- - strcmp of '1' and 'string' is => int(-%d)
216-
217- Iteration 1
218- - strcmp of '0' and '1' is => int(-%d)
219- - strcmp of '0' and '0' is => int(0)
220- - strcmp of '0' and '0' is => int(0)
221- - strcmp of '0' and '-1' is => int(%d)
222- - strcmp of '0' and '-1' is => int(%d)
223- - strcmp of '0' and '' is => int(%d)
224- - strcmp of '0' and '' is => int(%d)
225- - strcmp of '0' and '1' is => int(-%d)
226- - strcmp of '0' and '' is => int(%d)
227- - strcmp of '0' and 'string' is => int(-%d)
228-
229- Iteration 2
230- - strcmp of '0' and '1' is => int(-%d)
231- - strcmp of '0' and '0' is => int(0)
232- - strcmp of '0' and '0' is => int(0)
233- - strcmp of '0' and '-1' is => int(%d)
234- - strcmp of '0' and '-1' is => int(%d)
235- - strcmp of '0' and '' is => int(%d)
236- - strcmp of '0' and '' is => int(%d)
237- - strcmp of '0' and '1' is => int(-%d)
238- - strcmp of '0' and '' is => int(%d)
239- - strcmp of '0' and 'string' is => int(-%d)
240-
241- Iteration 3
242- - strcmp of '-1' and '1' is => int(-%d)
243- - strcmp of '-1' and '0' is => int(-%d)
244- - strcmp of '-1' and '0' is => int(-%d)
245- - strcmp of '-1' and '-1' is => int(0)
246- - strcmp of '-1' and '-1' is => int(0)
247- - strcmp of '-1' and '' is => int(%d)
248- - strcmp of '-1' and '' is => int(%d)
249- - strcmp of '-1' and '1' is => int(-%d)
250- - strcmp of '-1' and '' is => int(%d)
251- - strcmp of '-1' and 'string' is => int(-%d)
252-
253- Iteration 4
254- - strcmp of '-1' and '1' is => int(-%d)
255- - strcmp of '-1' and '0' is => int(-%d)
256- - strcmp of '-1' and '0' is => int(-%d)
257- - strcmp of '-1' and '-1' is => int(0)
258- - strcmp of '-1' and '-1' is => int(0)
259- - strcmp of '-1' and '' is => int(%d)
260- - strcmp of '-1' and '' is => int(%d)
261- - strcmp of '-1' and '1' is => int(-%d)
262- - strcmp of '-1' and '' is => int(%d)
263- - strcmp of '-1' and 'string' is => int(-%d)
264-
265- Iteration 5
266- - strcmp of '' and '1' is => int(-%d)
267- - strcmp of '' and '0' is => int(-%d)
268- - strcmp of '' and '0' is => int(-%d)
269- - strcmp of '' and '-1' is => int(-%d)
270- - strcmp of '' and '-1' is => int(-%d)
271- - strcmp of '' and '' is => int(0)
272- - strcmp of '' and '' is => int(0)
273- - strcmp of '' and '1' is => int(-%d)
274- - strcmp of '' and '' is => int(0)
275- - strcmp of '' and 'string' is => int(-%d)
276-
277- Iteration 6
278- - strcmp of '' and '1' is => int(-%d)
279- - strcmp of '' and '0' is => int(-%d)
280- - strcmp of '' and '0' is => int(-%d)
281- - strcmp of '' and '-1' is => int(-%d)
282- - strcmp of '' and '-1' is => int(-%d)
283- - strcmp of '' and '' is => int(0)
284- - strcmp of '' and '' is => int(0)
285- - strcmp of '' and '1' is => int(-%d)
286- - strcmp of '' and '' is => int(0)
287- - strcmp of '' and 'string' is => int(-%d)
288-
289- Iteration 7
290- - strcmp of '1' and '1' is => int(0)
291- - strcmp of '1' and '0' is => int(%d)
292- - strcmp of '1' and '0' is => int(%d)
293- - strcmp of '1' and '-1' is => int(%d)
294- - strcmp of '1' and '-1' is => int(%d)
295- - strcmp of '1' and '' is => int(%d)
296- - strcmp of '1' and '' is => int(%d)
297- - strcmp of '1' and '1' is => int(0)
298- - strcmp of '1' and '' is => int(%d)
299- - strcmp of '1' and 'string' is => int(-%d)
300-
301- Iteration 8
302- - strcmp of '' and '1' is => int(-%d)
303- - strcmp of '' and '0' is => int(-%d)
304- - strcmp of '' and '0' is => int(-%d)
305- - strcmp of '' and '-1' is => int(-%d)
306- - strcmp of '' and '-1' is => int(-%d)
307- - strcmp of '' and '' is => int(0)
308- - strcmp of '' and '' is => int(0)
309- - strcmp of '' and '1' is => int(-%d)
310- - strcmp of '' and '' is => int(0)
311- - strcmp of '' and 'string' is => int(-%d)
312-
313- Iteration 9
314- - strcmp of 'string' and '1' is => int(%d)
315- - strcmp of 'string' and '0' is => int(%d)
316- - strcmp of 'string' and '0' is => int(%d)
317- - strcmp of 'string' and '-1' is => int(%d)
318- - strcmp of 'string' and '-1' is => int(%d)
319- - strcmp of 'string' and '' is => int(%d)
320- - strcmp of 'string' and '' is => int(%d)
321- - strcmp of 'string' and '1' is => int(%d)
322- - strcmp of 'string' and '' is => int(%d)
323- - strcmp of 'string' and 'string' is => int(0)
324-
325- *** comparing the strings in an
326- Array
327- (
328- [0] => 10.5
329- [1] => 1.5
330- [2] => 9.5
331- [3] => 11.5
332- [4] => 100.5
333- [5] => 105
334- [6] => -10.5
335- [7] => 10
336- [8] => 0.5
337- )
338-
339- Iteration 0
340- - strcmp of '10.5' and '10.5' is => int(0)
341- - strcmp of '10.5' and '1.5' is => int(%d)
342- - strcmp of '10.5' and '9.5' is => int(-%d)
343- - strcmp of '10.5' and '11.5' is => int(-%d)
344- - strcmp of '10.5' and '100.5' is => int(-%d)
345- - strcmp of '10.5' and '105' is => int(-%d)
346- - strcmp of '10.5' and '-10.5' is => int(%d)
347- - strcmp of '10.5' and '10' is => int(%d)
348- - strcmp of '10.5' and '0.5' is => int(%d)
349-
350- Iteration 1
351- - strcmp of '1.5' and '10.5' is => int(-%d)
352- - strcmp of '1.5' and '1.5' is => int(0)
353- - strcmp of '1.5' and '9.5' is => int(-%d)
354- - strcmp of '1.5' and '11.5' is => int(-%d)
355- - strcmp of '1.5' and '100.5' is => int(-%d)
356- - strcmp of '1.5' and '105' is => int(-%d)
357- - strcmp of '1.5' and '-10.5' is => int(%d)
358- - strcmp of '1.5' and '10' is => int(-%d)
359- - strcmp of '1.5' and '0.5' is => int(%d)
360-
361- Iteration 2
362- - strcmp of '9.5' and '10.5' is => int(%d)
363- - strcmp of '9.5' and '1.5' is => int(%d)
364- - strcmp of '9.5' and '9.5' is => int(0)
365- - strcmp of '9.5' and '11.5' is => int(%d)
366- - strcmp of '9.5' and '100.5' is => int(%d)
367- - strcmp of '9.5' and '105' is => int(%d)
368- - strcmp of '9.5' and '-10.5' is => int(%d)
369- - strcmp of '9.5' and '10' is => int(%d)
370- - strcmp of '9.5' and '0.5' is => int(%d)
371-
372- Iteration 3
373- - strcmp of '11.5' and '10.5' is => int(%d)
374- - strcmp of '11.5' and '1.5' is => int(%d)
375- - strcmp of '11.5' and '9.5' is => int(-%d)
376- - strcmp of '11.5' and '11.5' is => int(0)
377- - strcmp of '11.5' and '100.5' is => int(%d)
378- - strcmp of '11.5' and '105' is => int(%d)
379- - strcmp of '11.5' and '-10.5' is => int(%d)
380- - strcmp of '11.5' and '10' is => int(%d)
381- - strcmp of '11.5' and '0.5' is => int(%d)
382-
383- Iteration 4
384- - strcmp of '100.5' and '10.5' is => int(%d)
385- - strcmp of '100.5' and '1.5' is => int(%d)
386- - strcmp of '100.5' and '9.5' is => int(-%d)
387- - strcmp of '100.5' and '11.5' is => int(-%d)
388- - strcmp of '100.5' and '100.5' is => int(0)
389- - strcmp of '100.5' and '105' is => int(-%d)
390- - strcmp of '100.5' and '-10.5' is => int(%d)
391- - strcmp of '100.5' and '10' is => int(%d)
392- - strcmp of '100.5' and '0.5' is => int(%d)
393-
394- Iteration 5
395- - strcmp of '105' and '10.5' is => int(%d)
396- - strcmp of '105' and '1.5' is => int(%d)
397- - strcmp of '105' and '9.5' is => int(-%d)
398- - strcmp of '105' and '11.5' is => int(-%d)
399- - strcmp of '105' and '100.5' is => int(%d)
400- - strcmp of '105' and '105' is => int(0)
401- - strcmp of '105' and '-10.5' is => int(%d)
402- - strcmp of '105' and '10' is => int(%d)
403- - strcmp of '105' and '0.5' is => int(%d)
404-
405- Iteration 6
406- - strcmp of '-10.5' and '10.5' is => int(-%d)
407- - strcmp of '-10.5' and '1.5' is => int(-%d)
408- - strcmp of '-10.5' and '9.5' is => int(-%d)
409- - strcmp of '-10.5' and '11.5' is => int(-%d)
410- - strcmp of '-10.5' and '100.5' is => int(-%d)
411- - strcmp of '-10.5' and '105' is => int(-%d)
412- - strcmp of '-10.5' and '-10.5' is => int(0)
413- - strcmp of '-10.5' and '10' is => int(-%d)
414- - strcmp of '-10.5' and '0.5' is => int(-%d)
415-
416- Iteration 7
417- - strcmp of '10' and '10.5' is => int(-%d)
418- - strcmp of '10' and '1.5' is => int(%d)
419- - strcmp of '10' and '9.5' is => int(-%d)
420- - strcmp of '10' and '11.5' is => int(-%d)
421- - strcmp of '10' and '100.5' is => int(-%d)
422- - strcmp of '10' and '105' is => int(-%d)
423- - strcmp of '10' and '-10.5' is => int(%d)
424- - strcmp of '10' and '10' is => int(0)
425- - strcmp of '10' and '0.5' is => int(%d)
426-
427- Iteration 8
428- - strcmp of '0.5' and '10.5' is => int(-%d)
429- - strcmp of '0.5' and '1.5' is => int(-%d)
430- - strcmp of '0.5' and '9.5' is => int(-%d)
431- - strcmp of '0.5' and '11.5' is => int(-%d)
432- - strcmp of '0.5' and '100.5' is => int(-%d)
433- - strcmp of '0.5' and '105' is => int(-%d)
434- - strcmp of '0.5' and '-10.5' is => int(%d)
435- - strcmp of '0.5' and '10' is => int(-%d)
436- - strcmp of '0.5' and '0.5' is => int(0)
437-
438- #### Testing Miscelleneous inputs ####
439- --- Testing objects ---
440- int(-%d)
441-
442- --- Testing arrays ---
443-
444- Warning: strcmp() expects parameter 2 to be string, array given in %s on line %d
445- NULL
446- int(%d)
447- int(%d)
448-
449- --- Testing Resources ---
450- int(0)
451- int(%d)
452-
453- --- Testing a longer and heredoc string ---
454- int(0)
455- int(-%d)
456- int(%d)
457-
458- --- Testing a heredoc null string ---
459- int(-%d)
460- int(0)
461- int(-%d)
462-
463- --- Testing simple and complex syntax strings ---
464- int(-%d)
465- int(-%d)
466-
467- Notice: Undefined variable: strS in %s on line %d
468- int(%d)
469- int(-%d)
470- int(-%d)
471-
472- --- Testing binary safe and binary chars ---
473- int(%d)
474- int(-%d)
475- int(0)
476- int(0)
477- int(%d)
478- int(%d)
479- int(%d)
480-
481- --- Comparing long float values ---
482- int(0)
483- int(-%d)
484- int(0)
485-
486- #### checking error conditions ####
487- Warning: strcmp() expects exactly 2 parameters, 0 given in %s on line %d
488-
489- Warning: strcmp() expects exactly 2 parameters, 1 given in %s on line %d
490-
491- Warning: strcmp() expects exactly 2 parameters, 1 given in %s on line %d
492-
493- Warning: strcmp() expects exactly 2 parameters, 3 given in %s on line %d
494- Done