From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- tests/lang/001.phpt | 6 + tests/lang/002.phpt | 12 + tests/lang/003.phpt | 19 + tests/lang/004.phpt | 13 + tests/lang/005.phpt | 16 + tests/lang/006.phpt | 23 + tests/lang/007.phpt | 27 + tests/lang/008.phpt | 18 + tests/lang/009.phpt | 11 + tests/lang/010.phpt | 13 + tests/lang/011.phpt | 23 + tests/lang/012.phpt | 18 + tests/lang/013.phpt | 10 + tests/lang/014.phpt | 13 + tests/lang/015.inc | 3 + tests/lang/015.phpt | 8 + tests/lang/016.inc | 5 + tests/lang/016.phpt | 9 + tests/lang/017.phpt | 18 + tests/lang/018.phpt | 34 + tests/lang/019.phpt | 38 + tests/lang/020.phpt | 76 + tests/lang/021.phpt | 42 + tests/lang/022.phpt | 63 + tests/lang/023-1.inc | 356 + tests/lang/023-2.inc | 6 + tests/lang/023.phpt | 256 + tests/lang/024.phpt | 11623 +++++++++++++++++++ tests/lang/025.phpt | 531 + tests/lang/026.phpt | 6 + tests/lang/027.phpt | 12 + tests/lang/028.phpt | 1058 ++ tests/lang/030.phpt | 36 + tests/lang/031.phpt | 70 + tests/lang/032.phpt | 36 + tests/lang/033.phpt | 47 + tests/lang/034.phpt | 23 + tests/lang/035.phpt | 38 + tests/lang/036.phpt | 27 + tests/lang/037.phpt | 30 + tests/lang/038.phpt | 41 + tests/lang/039.phpt | 45 + tests/lang/040.phpt | 15 + tests/lang/041.phpt | 20 + tests/lang/042.phpt | 19 + tests/lang/043.phpt | 19 + tests/lang/044.phpt | 21 + tests/lang/045.phpt | 27 + tests/lang/array_shortcut_001.phpt | 13 + tests/lang/array_shortcut_002.phpt | 13 + tests/lang/array_shortcut_003.phpt | 13 + tests/lang/array_shortcut_005.phpt | 20 + tests/lang/bison1.phpt | 9 + tests/lang/bug17115.phpt | 16 + tests/lang/bug18872.phpt | 18 + tests/lang/bug19566.phpt | 10 + tests/lang/bug19943.phpt | 29 + tests/lang/bug20175.phpt | 169 + tests/lang/bug21094.phpt | 17 + tests/lang/bug21600.phpt | 39 + tests/lang/bug21669.phpt | 23 + tests/lang/bug21820.phpt | 13 + tests/lang/bug21849.phpt | 16 + tests/lang/bug21961.phpt | 58 + tests/lang/bug22231.phpt | 42 + tests/lang/bug22510.phpt | 126 + tests/lang/bug22592.phpt | 53 + tests/lang/bug22690.phpt | 12 + tests/lang/bug23279.phpt | 16 + tests/lang/bug23384.phpt | 33 + tests/lang/bug23489.phpt | 23 + tests/lang/bug23524.phpt | 29 + tests/lang/bug23584.phpt | 13 + tests/lang/bug23624.phpt | 12 + tests/lang/bug23922.phpt | 20 + tests/lang/bug24054.phpt | 24 + tests/lang/bug24396.phpt | 19 + tests/lang/bug24403.phpt | 20 + tests/lang/bug24436.phpt | 15 + tests/lang/bug24499.phpt | 24 + tests/lang/bug24573.phpt | 24 + tests/lang/bug24640.phpt | 129 + tests/lang/bug24652.phpt | 31 + tests/lang/bug24658.phpt | 56 + tests/lang/bug24783.phpt | 13 + tests/lang/bug24908.phpt | 18 + tests/lang/bug24926.phpt | 28 + tests/lang/bug24951.phpt | 42 + tests/lang/bug25145.phpt | 20 + tests/lang/bug25547.phpt | 30 + tests/lang/bug25652.phpt | 22 + tests/lang/bug25922.phpt | 23 + tests/lang/bug26182.phpt | 25 + tests/lang/bug26696.phpt | 28 + tests/lang/bug26866.phpt | 25 + tests/lang/bug26869.phpt | 15 + tests/lang/bug27354.phpt | 14 + tests/lang/bug27439.phpt | 76 + tests/lang/bug27443.phpt | 8 + tests/lang/bug27535.phpt | 28 + tests/lang/bug28213.phpt | 10 + tests/lang/bug28800.phpt | 17 + tests/lang/bug29566.phpt | 18 + tests/lang/bug29893.phpt | 11 + tests/lang/bug29944.phpt | 20 + tests/lang/bug30578.phpt | 31 + tests/lang/bug30638.phpt | 26 + tests/lang/bug30726.phpt | 8 + tests/lang/bug30862.phpt | 30 + tests/lang/bug32828.phpt | 21 + tests/lang/bug32924.phpt | 14 + tests/lang/bug35176.phpt | 15 + tests/lang/bug35382.phpt | 9 + tests/lang/bug38579.inc | 3 + tests/lang/bug38579.phpt | 16 + tests/lang/bug43958.phpt | 17 + tests/lang/bug44654.phpt | 8 + tests/lang/bug44827.phpt | 17 + tests/lang/bug45392.phpt | 23 + tests/lang/bug55754.phpt | 14 + tests/lang/bug7515.phpt | 37 + tests/lang/catchable_error_001.phpt | 22 + tests/lang/catchable_error_002.phpt | 37 + tests/lang/comments.phpt | 24 + tests/lang/comments2.phpt | 9 + tests/lang/compare_objects_basic1.phpt | 60 + tests/lang/compare_objects_basic2.phpt | 24 + tests/lang/each_binary_safety.phpt | 13 + tests/lang/empty_variation.phpt | 14 + tests/lang/engine_assignExecutionOrder_001.phpt | 152 + tests/lang/engine_assignExecutionOrder_002.phpt | 135 + tests/lang/engine_assignExecutionOrder_003.phpt | 96 + tests/lang/engine_assignExecutionOrder_004.phpt | 52 + tests/lang/engine_assignExecutionOrder_005.phpt | 74 + tests/lang/engine_assignExecutionOrder_006.phpt | 138 + tests/lang/engine_assignExecutionOrder_007.phpt | 46 + tests/lang/engine_assignExecutionOrder_008.phpt | 81 + tests/lang/engine_assignExecutionOrder_009.phpt | 36 + tests/lang/error_2_exception_001.phpt | 45 + tests/lang/execution_order.phpt | 198 + tests/lang/foreachLoop.001.phpt | 64 + tests/lang/foreachLoop.002.phpt | 173 + tests/lang/foreachLoop.003.phpt | 46 + tests/lang/foreachLoop.004.phpt | 76 + tests/lang/foreachLoop.005.phpt | 23 + tests/lang/foreachLoop.006.phpt | 11 + tests/lang/foreachLoop.007.phpt | 11 + tests/lang/foreachLoop.008.phpt | 10 + tests/lang/foreachLoop.009.phpt | 82 + tests/lang/foreachLoop.010.phpt | 40 + tests/lang/foreachLoop.011.phpt | 34 + tests/lang/foreachLoop.012.phpt | 494 + tests/lang/foreachLoop.013.phpt | 555 + tests/lang/foreachLoop.014.phpt | 556 + tests/lang/foreachLoop.015.phpt | 557 + tests/lang/foreachLoop.016.phpt | 206 + tests/lang/foreachLoop.017.phpt | 11 + tests/lang/foreachLoopIterator.001.phpt | 134 + tests/lang/foreachLoopIterator.002.phpt | 24 + tests/lang/foreachLoopIteratorAggregate.001.phpt | 270 + tests/lang/foreachLoopIteratorAggregate.002.phpt | 53 + tests/lang/foreachLoopIteratorAggregate.003.phpt | 133 + tests/lang/foreachLoopIteratorAggregate.004.phpt | 104 + tests/lang/foreachLoopObjects.001.phpt | 69 + tests/lang/foreachLoopObjects.002.phpt | 587 + tests/lang/foreachLoopObjects.003.phpt | 250 + tests/lang/foreachLoopObjects.004.phpt | 55 + tests/lang/foreachLoopObjects.005.phpt | 78 + tests/lang/foreachLoopObjects.006.phpt | 147 + tests/lang/foreach_with_object_001.phpt | 25 + tests/lang/foreach_with_references_001.phpt | 32 + tests/lang/func_get_arg.001.phpt | 15 + tests/lang/func_get_arg.002.phpt | 19 + tests/lang/func_get_arg.003.phpt | 11 + tests/lang/func_get_arg.004.phpt | 16 + tests/lang/func_get_arg.005.phpt | 19 + tests/lang/func_get_arg_variation.phpt | 28 + tests/lang/func_get_args.001.phpt | 15 + tests/lang/func_get_args.002.phpt | 22 + tests/lang/func_get_args.003.phpt | 11 + tests/lang/func_get_args.004.phpt | 67 + tests/lang/func_num_args.001.phpt | 14 + tests/lang/func_num_args.002.phpt | 14 + tests/lang/func_num_args.003.phpt | 12 + tests/lang/func_num_args.004.phpt | 48 + tests/lang/inc.inc | 3 + tests/lang/inc_throw.inc | 5 + tests/lang/include_files/echo.inc | 3 + tests/lang/include_files/eval.inc | 3 + tests/lang/include_files/function.inc | 3 + tests/lang/include_variation1.phpt | 8 + tests/lang/include_variation2.phpt | 9 + tests/lang/include_variation3.phpt | 8 + tests/lang/operators/add_basiclong_64bit.phpt | 582 + tests/lang/operators/add_variationStr.phpt | 416 + .../lang/operators/bitwiseAnd_basiclong_64bit.phpt | 582 + tests/lang/operators/bitwiseAnd_variationStr.phpt | 416 + .../lang/operators/bitwiseNot_basiclong_64bit.phpt | 60 + tests/lang/operators/bitwiseNot_variationStr.phpt | 48 + .../lang/operators/bitwiseOr_basiclong_64bit.phpt | 583 + tests/lang/operators/bitwiseOr_variationStr.phpt | 416 + .../bitwiseShiftLeft_basiclong_64bit.phpt | 583 + .../operators/bitwiseShiftLeft_variationStr.phpt | 421 + .../bitwiseShiftLeft_variationStr_64bit.phpt | 420 + .../bitwiseShiftRight_basiclong_64bit.phpt | 583 + .../operators/bitwiseShiftRight_variationStr.phpt | 416 + .../lang/operators/bitwiseXor_basiclong_64bit.phpt | 583 + tests/lang/operators/bitwiseXor_variationStr.phpt | 416 + tests/lang/operators/divide_basiclong_64bit.phpt | 582 + tests/lang/operators/divide_variationStr.phpt | 416 + tests/lang/operators/modulus_basiclong_64bit.phpt | 582 + tests/lang/operators/modulus_variationStr.phpt | 416 + tests/lang/operators/multiply_basiclong_64bit.phpt | 582 + tests/lang/operators/multiply_variationStr.phpt | 416 + tests/lang/operators/negate_basiclong_64bit.phpt | 60 + tests/lang/operators/negate_variationStr.phpt | 48 + tests/lang/operators/operator_equals_basic.phpt | 65 + .../lang/operators/operator_equals_variation.phpt | 63 + .../operators/operator_equals_variation_64bit.phpt | 65 + tests/lang/operators/operator_gt_basic.phpt | 65 + .../lang/operators/operator_gt_or_equal_basic.phpt | 65 + .../operators/operator_gt_or_equal_variation.phpt | 63 + .../operator_gt_or_equal_variation_64bit.phpt | 63 + tests/lang/operators/operator_gt_variation.phpt | 62 + .../operators/operator_gt_variation_64bit.phpt | 62 + tests/lang/operators/operator_identical_basic.phpt | 65 + .../operators/operator_identical_variation.phpt | 63 + .../operator_identical_variation_64bit.phpt | 65 + tests/lang/operators/operator_lt_basic.phpt | 62 + .../lang/operators/operator_lt_or_equal_basic.phpt | 64 + .../operators/operator_lt_or_equal_variation.phpt | 63 + .../operator_lt_or_equal_variation_64bit.phpt | 63 + tests/lang/operators/operator_lt_variation.phpt | 60 + .../operators/operator_lt_variation_64bit.phpt | 60 + tests/lang/operators/operator_notequals_basic.phpt | 65 + .../operators/operator_notequals_variation.phpt | 63 + .../operator_notequals_variation_64bit.phpt | 65 + .../operators/operator_notidentical_basic.phpt | 65 + .../operators/operator_notidentical_variation.phpt | 64 + .../operator_notidentical_variation_64bit.phpt | 65 + tests/lang/operators/postdec_basiclong_64bit.phpt | 61 + tests/lang/operators/postdec_variationStr.phpt | 49 + tests/lang/operators/postinc_basiclong_64bit.phpt | 61 + tests/lang/operators/postinc_variationStr.phpt | 49 + tests/lang/operators/predec_basiclong_64bit.phpt | 60 + tests/lang/operators/predec_variationStr.phpt | 48 + tests/lang/operators/preinc_basiclong_64bit.phpt | 60 + tests/lang/operators/preinc_variationStr.phpt | 48 + tests/lang/operators/subtract_basiclong_64bit.phpt | 582 + tests/lang/operators/subtract_variationStr.phpt | 416 + tests/lang/passByReference_001.phpt | 37 + tests/lang/passByReference_002.phpt | 15 + tests/lang/passByReference_003.phpt | 48 + tests/lang/passByReference_004.phpt | 21 + tests/lang/passByReference_005.phpt | 261 + tests/lang/passByReference_006.phpt | 195 + tests/lang/passByReference_007.phpt | 105 + tests/lang/passByReference_008.phpt | 40 + tests/lang/passByReference_009.phpt | 24 + tests/lang/passByReference_010.phpt | 61 + tests/lang/passByReference_012.phpt | 25 + tests/lang/returnByReference.001.phpt | 20 + tests/lang/returnByReference.002.phpt | 29 + tests/lang/returnByReference.003.phpt | 55 + tests/lang/returnByReference.004.phpt | 57 + tests/lang/returnByReference.005.phpt | 58 + tests/lang/returnByReference.006.phpt | 60 + tests/lang/returnByReference.007.phpt | 63 + tests/lang/returnByReference.008.phpt | 64 + tests/lang/returnByReference.009.phpt | 39 + tests/lang/script_tag.phpt | 17 + tests/lang/short_tags.001.phpt | 12 + tests/lang/short_tags.002.phpt | 14 + tests/lang/short_tags.003.phpt | 32 + tests/lang/short_tags.004.phpt | 35 + tests/lang/static_basic_001.phpt | 84 + tests/lang/static_basic_002.phpt | 28 + tests/lang/static_variation_001.phpt | 112 + tests/lang/static_variation_002.phpt | 84 + tests/lang/string_decimals_001.phpt | 45 + tests/lang/this_assignment.phpt | 43 + tests/lang/throw_variation_001.phpt | 14 + tests/lang/type_hints_001.phpt | 26 + tests/lang/type_hints_002.phpt | 28 + tests/lang/type_hints_003.phpt | 14 + 285 files changed, 37827 insertions(+) create mode 100644 tests/lang/001.phpt create mode 100644 tests/lang/002.phpt create mode 100644 tests/lang/003.phpt create mode 100644 tests/lang/004.phpt create mode 100644 tests/lang/005.phpt create mode 100644 tests/lang/006.phpt create mode 100644 tests/lang/007.phpt create mode 100644 tests/lang/008.phpt create mode 100644 tests/lang/009.phpt create mode 100644 tests/lang/010.phpt create mode 100644 tests/lang/011.phpt create mode 100644 tests/lang/012.phpt create mode 100644 tests/lang/013.phpt create mode 100644 tests/lang/014.phpt create mode 100644 tests/lang/015.inc create mode 100644 tests/lang/015.phpt create mode 100644 tests/lang/016.inc create mode 100644 tests/lang/016.phpt create mode 100644 tests/lang/017.phpt create mode 100644 tests/lang/018.phpt create mode 100644 tests/lang/019.phpt create mode 100644 tests/lang/020.phpt create mode 100644 tests/lang/021.phpt create mode 100644 tests/lang/022.phpt create mode 100644 tests/lang/023-1.inc create mode 100644 tests/lang/023-2.inc create mode 100644 tests/lang/023.phpt create mode 100644 tests/lang/024.phpt create mode 100644 tests/lang/025.phpt create mode 100644 tests/lang/026.phpt create mode 100644 tests/lang/027.phpt create mode 100644 tests/lang/028.phpt create mode 100644 tests/lang/030.phpt create mode 100644 tests/lang/031.phpt create mode 100644 tests/lang/032.phpt create mode 100644 tests/lang/033.phpt create mode 100644 tests/lang/034.phpt create mode 100644 tests/lang/035.phpt create mode 100644 tests/lang/036.phpt create mode 100644 tests/lang/037.phpt create mode 100644 tests/lang/038.phpt create mode 100644 tests/lang/039.phpt create mode 100644 tests/lang/040.phpt create mode 100644 tests/lang/041.phpt create mode 100644 tests/lang/042.phpt create mode 100644 tests/lang/043.phpt create mode 100644 tests/lang/044.phpt create mode 100644 tests/lang/045.phpt create mode 100644 tests/lang/array_shortcut_001.phpt create mode 100644 tests/lang/array_shortcut_002.phpt create mode 100644 tests/lang/array_shortcut_003.phpt create mode 100644 tests/lang/array_shortcut_005.phpt create mode 100644 tests/lang/bison1.phpt create mode 100644 tests/lang/bug17115.phpt create mode 100644 tests/lang/bug18872.phpt create mode 100644 tests/lang/bug19566.phpt create mode 100644 tests/lang/bug19943.phpt create mode 100644 tests/lang/bug20175.phpt create mode 100644 tests/lang/bug21094.phpt create mode 100644 tests/lang/bug21600.phpt create mode 100644 tests/lang/bug21669.phpt create mode 100644 tests/lang/bug21820.phpt create mode 100644 tests/lang/bug21849.phpt create mode 100644 tests/lang/bug21961.phpt create mode 100644 tests/lang/bug22231.phpt create mode 100644 tests/lang/bug22510.phpt create mode 100644 tests/lang/bug22592.phpt create mode 100644 tests/lang/bug22690.phpt create mode 100644 tests/lang/bug23279.phpt create mode 100644 tests/lang/bug23384.phpt create mode 100644 tests/lang/bug23489.phpt create mode 100644 tests/lang/bug23524.phpt create mode 100644 tests/lang/bug23584.phpt create mode 100644 tests/lang/bug23624.phpt create mode 100644 tests/lang/bug23922.phpt create mode 100644 tests/lang/bug24054.phpt create mode 100644 tests/lang/bug24396.phpt create mode 100644 tests/lang/bug24403.phpt create mode 100644 tests/lang/bug24436.phpt create mode 100644 tests/lang/bug24499.phpt create mode 100644 tests/lang/bug24573.phpt create mode 100644 tests/lang/bug24640.phpt create mode 100644 tests/lang/bug24652.phpt create mode 100644 tests/lang/bug24658.phpt create mode 100644 tests/lang/bug24783.phpt create mode 100644 tests/lang/bug24908.phpt create mode 100644 tests/lang/bug24926.phpt create mode 100644 tests/lang/bug24951.phpt create mode 100644 tests/lang/bug25145.phpt create mode 100644 tests/lang/bug25547.phpt create mode 100644 tests/lang/bug25652.phpt create mode 100644 tests/lang/bug25922.phpt create mode 100644 tests/lang/bug26182.phpt create mode 100644 tests/lang/bug26696.phpt create mode 100644 tests/lang/bug26866.phpt create mode 100644 tests/lang/bug26869.phpt create mode 100644 tests/lang/bug27354.phpt create mode 100644 tests/lang/bug27439.phpt create mode 100644 tests/lang/bug27443.phpt create mode 100644 tests/lang/bug27535.phpt create mode 100644 tests/lang/bug28213.phpt create mode 100644 tests/lang/bug28800.phpt create mode 100644 tests/lang/bug29566.phpt create mode 100644 tests/lang/bug29893.phpt create mode 100644 tests/lang/bug29944.phpt create mode 100644 tests/lang/bug30578.phpt create mode 100644 tests/lang/bug30638.phpt create mode 100644 tests/lang/bug30726.phpt create mode 100644 tests/lang/bug30862.phpt create mode 100644 tests/lang/bug32828.phpt create mode 100644 tests/lang/bug32924.phpt create mode 100644 tests/lang/bug35176.phpt create mode 100644 tests/lang/bug35382.phpt create mode 100644 tests/lang/bug38579.inc create mode 100644 tests/lang/bug38579.phpt create mode 100644 tests/lang/bug43958.phpt create mode 100644 tests/lang/bug44654.phpt create mode 100644 tests/lang/bug44827.phpt create mode 100644 tests/lang/bug45392.phpt create mode 100644 tests/lang/bug55754.phpt create mode 100644 tests/lang/bug7515.phpt create mode 100644 tests/lang/catchable_error_001.phpt create mode 100644 tests/lang/catchable_error_002.phpt create mode 100644 tests/lang/comments.phpt create mode 100644 tests/lang/comments2.phpt create mode 100644 tests/lang/compare_objects_basic1.phpt create mode 100644 tests/lang/compare_objects_basic2.phpt create mode 100644 tests/lang/each_binary_safety.phpt create mode 100644 tests/lang/empty_variation.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_001.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_002.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_003.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_004.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_005.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_006.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_007.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_008.phpt create mode 100644 tests/lang/engine_assignExecutionOrder_009.phpt create mode 100644 tests/lang/error_2_exception_001.phpt create mode 100644 tests/lang/execution_order.phpt create mode 100644 tests/lang/foreachLoop.001.phpt create mode 100644 tests/lang/foreachLoop.002.phpt create mode 100644 tests/lang/foreachLoop.003.phpt create mode 100644 tests/lang/foreachLoop.004.phpt create mode 100644 tests/lang/foreachLoop.005.phpt create mode 100644 tests/lang/foreachLoop.006.phpt create mode 100644 tests/lang/foreachLoop.007.phpt create mode 100644 tests/lang/foreachLoop.008.phpt create mode 100644 tests/lang/foreachLoop.009.phpt create mode 100644 tests/lang/foreachLoop.010.phpt create mode 100644 tests/lang/foreachLoop.011.phpt create mode 100644 tests/lang/foreachLoop.012.phpt create mode 100644 tests/lang/foreachLoop.013.phpt create mode 100644 tests/lang/foreachLoop.014.phpt create mode 100644 tests/lang/foreachLoop.015.phpt create mode 100644 tests/lang/foreachLoop.016.phpt create mode 100644 tests/lang/foreachLoop.017.phpt create mode 100644 tests/lang/foreachLoopIterator.001.phpt create mode 100644 tests/lang/foreachLoopIterator.002.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.001.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.002.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.003.phpt create mode 100644 tests/lang/foreachLoopIteratorAggregate.004.phpt create mode 100644 tests/lang/foreachLoopObjects.001.phpt create mode 100644 tests/lang/foreachLoopObjects.002.phpt create mode 100644 tests/lang/foreachLoopObjects.003.phpt create mode 100644 tests/lang/foreachLoopObjects.004.phpt create mode 100644 tests/lang/foreachLoopObjects.005.phpt create mode 100644 tests/lang/foreachLoopObjects.006.phpt create mode 100644 tests/lang/foreach_with_object_001.phpt create mode 100644 tests/lang/foreach_with_references_001.phpt create mode 100644 tests/lang/func_get_arg.001.phpt create mode 100644 tests/lang/func_get_arg.002.phpt create mode 100644 tests/lang/func_get_arg.003.phpt create mode 100644 tests/lang/func_get_arg.004.phpt create mode 100644 tests/lang/func_get_arg.005.phpt create mode 100644 tests/lang/func_get_arg_variation.phpt create mode 100644 tests/lang/func_get_args.001.phpt create mode 100644 tests/lang/func_get_args.002.phpt create mode 100644 tests/lang/func_get_args.003.phpt create mode 100644 tests/lang/func_get_args.004.phpt create mode 100644 tests/lang/func_num_args.001.phpt create mode 100644 tests/lang/func_num_args.002.phpt create mode 100644 tests/lang/func_num_args.003.phpt create mode 100644 tests/lang/func_num_args.004.phpt create mode 100644 tests/lang/inc.inc create mode 100644 tests/lang/inc_throw.inc create mode 100644 tests/lang/include_files/echo.inc create mode 100644 tests/lang/include_files/eval.inc create mode 100644 tests/lang/include_files/function.inc create mode 100644 tests/lang/include_variation1.phpt create mode 100644 tests/lang/include_variation2.phpt create mode 100644 tests/lang/include_variation3.phpt create mode 100644 tests/lang/operators/add_basiclong_64bit.phpt create mode 100644 tests/lang/operators/add_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseAnd_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseNot_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseNot_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseOr_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseOr_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseShiftRight_variationStr.phpt create mode 100644 tests/lang/operators/bitwiseXor_basiclong_64bit.phpt create mode 100644 tests/lang/operators/bitwiseXor_variationStr.phpt create mode 100644 tests/lang/operators/divide_basiclong_64bit.phpt create mode 100644 tests/lang/operators/divide_variationStr.phpt create mode 100644 tests/lang/operators/modulus_basiclong_64bit.phpt create mode 100644 tests/lang/operators/modulus_variationStr.phpt create mode 100644 tests/lang/operators/multiply_basiclong_64bit.phpt create mode 100644 tests/lang/operators/multiply_variationStr.phpt create mode 100644 tests/lang/operators/negate_basiclong_64bit.phpt create mode 100644 tests/lang/operators/negate_variationStr.phpt create mode 100644 tests/lang/operators/operator_equals_basic.phpt create mode 100644 tests/lang/operators/operator_equals_variation.phpt create mode 100644 tests/lang/operators/operator_equals_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_gt_basic.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_basic.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_variation.phpt create mode 100644 tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_gt_variation.phpt create mode 100644 tests/lang/operators/operator_gt_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_identical_basic.phpt create mode 100644 tests/lang/operators/operator_identical_variation.phpt create mode 100644 tests/lang/operators/operator_identical_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_lt_basic.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_basic.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_variation.phpt create mode 100644 tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_lt_variation.phpt create mode 100644 tests/lang/operators/operator_lt_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_notequals_basic.phpt create mode 100644 tests/lang/operators/operator_notequals_variation.phpt create mode 100644 tests/lang/operators/operator_notequals_variation_64bit.phpt create mode 100644 tests/lang/operators/operator_notidentical_basic.phpt create mode 100644 tests/lang/operators/operator_notidentical_variation.phpt create mode 100644 tests/lang/operators/operator_notidentical_variation_64bit.phpt create mode 100644 tests/lang/operators/postdec_basiclong_64bit.phpt create mode 100644 tests/lang/operators/postdec_variationStr.phpt create mode 100644 tests/lang/operators/postinc_basiclong_64bit.phpt create mode 100644 tests/lang/operators/postinc_variationStr.phpt create mode 100644 tests/lang/operators/predec_basiclong_64bit.phpt create mode 100644 tests/lang/operators/predec_variationStr.phpt create mode 100644 tests/lang/operators/preinc_basiclong_64bit.phpt create mode 100644 tests/lang/operators/preinc_variationStr.phpt create mode 100644 tests/lang/operators/subtract_basiclong_64bit.phpt create mode 100644 tests/lang/operators/subtract_variationStr.phpt create mode 100644 tests/lang/passByReference_001.phpt create mode 100644 tests/lang/passByReference_002.phpt create mode 100644 tests/lang/passByReference_003.phpt create mode 100644 tests/lang/passByReference_004.phpt create mode 100644 tests/lang/passByReference_005.phpt create mode 100644 tests/lang/passByReference_006.phpt create mode 100644 tests/lang/passByReference_007.phpt create mode 100644 tests/lang/passByReference_008.phpt create mode 100644 tests/lang/passByReference_009.phpt create mode 100644 tests/lang/passByReference_010.phpt create mode 100644 tests/lang/passByReference_012.phpt create mode 100644 tests/lang/returnByReference.001.phpt create mode 100644 tests/lang/returnByReference.002.phpt create mode 100644 tests/lang/returnByReference.003.phpt create mode 100644 tests/lang/returnByReference.004.phpt create mode 100644 tests/lang/returnByReference.005.phpt create mode 100644 tests/lang/returnByReference.006.phpt create mode 100644 tests/lang/returnByReference.007.phpt create mode 100644 tests/lang/returnByReference.008.phpt create mode 100644 tests/lang/returnByReference.009.phpt create mode 100644 tests/lang/script_tag.phpt create mode 100644 tests/lang/short_tags.001.phpt create mode 100644 tests/lang/short_tags.002.phpt create mode 100644 tests/lang/short_tags.003.phpt create mode 100644 tests/lang/short_tags.004.phpt create mode 100644 tests/lang/static_basic_001.phpt create mode 100644 tests/lang/static_basic_002.phpt create mode 100644 tests/lang/static_variation_001.phpt create mode 100644 tests/lang/static_variation_002.phpt create mode 100644 tests/lang/string_decimals_001.phpt create mode 100644 tests/lang/this_assignment.phpt create mode 100644 tests/lang/throw_variation_001.phpt create mode 100644 tests/lang/type_hints_001.phpt create mode 100644 tests/lang/type_hints_002.phpt create mode 100644 tests/lang/type_hints_003.phpt (limited to 'tests/lang') diff --git a/tests/lang/001.phpt b/tests/lang/001.phpt new file mode 100644 index 0000000..71df318 --- /dev/null +++ b/tests/lang/001.phpt @@ -0,0 +1,6 @@ +--TEST-- +Simple If condition test +--FILE-- +0) { echo "Yes"; } ?> +--EXPECT-- +Yes diff --git a/tests/lang/002.phpt b/tests/lang/002.phpt new file mode 100644 index 0000000..ec14d01 --- /dev/null +++ b/tests/lang/002.phpt @@ -0,0 +1,12 @@ +--TEST-- +Simple While Loop Test +--FILE-- + +--EXPECT-- +123456789 diff --git a/tests/lang/003.phpt b/tests/lang/003.phpt new file mode 100644 index 0000000..7049db9 --- /dev/null +++ b/tests/lang/003.phpt @@ -0,0 +1,19 @@ +--TEST-- +Simple Switch Test +--FILE-- + +--EXPECT-- +good diff --git a/tests/lang/004.phpt b/tests/lang/004.phpt new file mode 100644 index 0000000..be8ebf4 --- /dev/null +++ b/tests/lang/004.phpt @@ -0,0 +1,13 @@ +--TEST-- +Simple If/Else Test +--FILE-- + +--EXPECT-- +good diff --git a/tests/lang/005.phpt b/tests/lang/005.phpt new file mode 100644 index 0000000..404a7cb --- /dev/null +++ b/tests/lang/005.phpt @@ -0,0 +1,16 @@ +--TEST-- +Simple If/ElseIf/Else Test +--FILE-- + +--EXPECT-- +good diff --git a/tests/lang/006.phpt b/tests/lang/006.phpt new file mode 100644 index 0000000..2a2db01 --- /dev/null +++ b/tests/lang/006.phpt @@ -0,0 +1,23 @@ +--TEST-- +Nested If/ElseIf/Else Test +--FILE-- + +--EXPECT-- +good diff --git a/tests/lang/007.phpt b/tests/lang/007.phpt new file mode 100644 index 0000000..4576d4e --- /dev/null +++ b/tests/lang/007.phpt @@ -0,0 +1,27 @@ +--TEST-- +Function call with global and static variables +--FILE-- + +--EXPECT-- +1 5 2 2 10 5 2 5 3 2 10 5 3 5 4 2 diff --git a/tests/lang/008.phpt b/tests/lang/008.phpt new file mode 100644 index 0000000..d335e6f --- /dev/null +++ b/tests/lang/008.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing recursive function +--FILE-- + +--EXPECT-- +1 2 3 4 5 6 7 8 9 diff --git a/tests/lang/009.phpt b/tests/lang/009.phpt new file mode 100644 index 0000000..ea2aa92 --- /dev/null +++ b/tests/lang/009.phpt @@ -0,0 +1,11 @@ +--TEST-- +Testing function parameter passing +--FILE-- + +--EXPECT-- +3 diff --git a/tests/lang/010.phpt b/tests/lang/010.phpt new file mode 100644 index 0000000..603abe3 --- /dev/null +++ b/tests/lang/010.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing function parameter passing with a return value +--FILE-- + +--EXPECT-- +2 diff --git a/tests/lang/011.phpt b/tests/lang/011.phpt new file mode 100644 index 0000000..771ef7c --- /dev/null +++ b/tests/lang/011.phpt @@ -0,0 +1,23 @@ +--TEST-- +Testing nested functions +--FILE-- + +--EXPECT-- +4 Hello 4 diff --git a/tests/lang/012.phpt b/tests/lang/012.phpt new file mode 100644 index 0000000..117137a --- /dev/null +++ b/tests/lang/012.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing stack after early function return +--FILE-- + +--EXPECT-- +HelloHello diff --git a/tests/lang/013.phpt b/tests/lang/013.phpt new file mode 100644 index 0000000..be84cdc --- /dev/null +++ b/tests/lang/013.phpt @@ -0,0 +1,10 @@ +--TEST-- +Testing eval function +--FILE-- + +--EXPECT-- +Hello diff --git a/tests/lang/014.phpt b/tests/lang/014.phpt new file mode 100644 index 0000000..f0033b2 --- /dev/null +++ b/tests/lang/014.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing eval function inside user-defined function +--FILE-- + +--EXPECT-- +Hello diff --git a/tests/lang/015.inc b/tests/lang/015.inc new file mode 100644 index 0000000..d436a7b --- /dev/null +++ b/tests/lang/015.inc @@ -0,0 +1,3 @@ + diff --git a/tests/lang/015.phpt b/tests/lang/015.phpt new file mode 100644 index 0000000..952e7f1 --- /dev/null +++ b/tests/lang/015.phpt @@ -0,0 +1,8 @@ +--TEST-- +Testing include +--FILE-- + +--EXPECT-- +Hello diff --git a/tests/lang/016.inc b/tests/lang/016.inc new file mode 100644 index 0000000..b73333f --- /dev/null +++ b/tests/lang/016.inc @@ -0,0 +1,5 @@ + diff --git a/tests/lang/016.phpt b/tests/lang/016.phpt new file mode 100644 index 0000000..dbaa908 --- /dev/null +++ b/tests/lang/016.phpt @@ -0,0 +1,9 @@ +--TEST-- +Testing user-defined function in included file +--FILE-- + +--EXPECT-- +Hello diff --git a/tests/lang/017.phpt b/tests/lang/017.phpt new file mode 100644 index 0000000..fb90964 --- /dev/null +++ b/tests/lang/017.phpt @@ -0,0 +1,18 @@ +--TEST-- +Testing user-defined function falling out of an If into another +--FILE-- + +--EXPECT-- +1 diff --git a/tests/lang/018.phpt b/tests/lang/018.phpt new file mode 100644 index 0000000..638b131 --- /dev/null +++ b/tests/lang/018.phpt @@ -0,0 +1,34 @@ +--TEST-- +eval() test +--FILE-- + +--EXPECT-- +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 +In branch 1 +Inner default... +blah=100 diff --git a/tests/lang/021.phpt b/tests/lang/021.phpt new file mode 100644 index 0000000..aff45b6 --- /dev/null +++ b/tests/lang/021.phpt @@ -0,0 +1,42 @@ +--TEST-- +Switch test 2 +--FILE-- + +--EXPECT-- +i=0 +In branch 0 +i=1 +In branch 1 +i=2 +In branch 2 +i=3 +In branch 3 +hi diff --git a/tests/lang/022.phpt b/tests/lang/022.phpt new file mode 100644 index 0000000..dddc6c2 --- /dev/null +++ b/tests/lang/022.phpt @@ -0,0 +1,63 @@ +--TEST-- +Switch test 3 +--FILE-- + +--EXPECT-- +zero +one +2 +3 +4 +5 +6 +7 +8 +9 +zero +one +2 +3 +4 +5 +6 +7 +8 +9 +zero +one +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/tests/lang/023-1.inc b/tests/lang/023-1.inc new file mode 100644 index 0000000..8d52e84 --- /dev/null +++ b/tests/lang/023-1.inc @@ -0,0 +1,356 @@ + + + + +*** Testing assignments and variable aliasing: ***
+ +This should read "blah": \n"; ?> +This should read "this is nifty": \n"; ?> +*************************************************
+ +*** Testing integer operators ***
+ +Correct result - 8:
+Correct result - 8:
+Correct result - 2:
+Correct result - -2:
+Correct result - 15:
+Correct result - 15:
+Correct result - 2:
+Correct result - 3:
+*********************************
+ +*** Testing real operators ***
+ +Correct result - 8:
+Correct result - 8:
+Correct result - 2:
+Correct result - -2:
+Correct result - 15:
+Correct result - 15:
+Correct result - 2:
+Correct result - 3:
+*********************************
+ +*** Testing if/elseif/else control ***
+ +\n"; +} elseif ($a == "5") { + echo "This "." works
\n"; + $a = 6; + if ("andi" == ($test = "andi")) { + echo "this_still_works
\n"; + } elseif (1) { + echo "should_not_print
\n"; + } else { + echo "should_not_print
\n"; + } + if (44 == 43) { + echo "should_not_print
\n"; + } else { + echo "should_print
\n"; + } +} elseif ($a == 6) { + echo "this "."broken
\n"; + if (0) { + echo "this_should_not_print
\n"; + } else { + echo "TestingDanglingElse_This_Should_not_print
\n"; + } +} else { + echo "This "."does "." not"." work
\n"; +} +?> + + +*** Seriously nested if's test ***
+** spelling correction by kluzz ** +\n"; +if (0) { /* this code is not supposed to be executed */ + echo "hmm, this shouldn't be displayed #1
\n"; + $j++; + if (1) { + $i ++= + $j; + if (0) { + $j = ++$i; + if (1) { + $j *= $i; + echo "damn, this shouldn't be displayed
\n"; + } else { + $j /= $i; + ++$j; + echo "this shouldn't be displayed either
\n"; + } + } elseif (1) { + $i++; $j++; + echo "this isn't supposed to be displayed
\n"; + } + } elseif (0) { + $i++; + echo "this definitely shouldn't be displayed
\n"; + } else { + --$j; + echo "and this too shouldn't be displayed
\n"; + while ($j>0) { + $j--; + } + } +} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */ + $i = ++$j; + echo "hmm, this shouldn't be displayed #2
\n"; + if (1) { + $j = ++$i; + if (0) { + $j = $i*2+$j*($i++); + if (1) { + $i++; + echo "damn, this shouldn't be displayed
\n"; + } else { + $j++; + echo "this shouldn't be displayed either
\n"; + } + } else if (1) { + ++$j; + echo "this isn't supposed to be displayed
\n"; + } + } elseif (0) { + $j++; + echo "this definitely shouldn't be displayed
\n"; + } else { + $i++; + echo "and this too shouldn't be displayed
\n"; + } +} else { + $j=$i++; /* this should set $i to 1, but shouldn't change $j (it's assigned $i's previous values, zero) */ + echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j
\n"; + if (1) { + $j += ++$i; /* ++$i --> $i==2, $j += 2 --> $j==2 */ + if (0) { + $j += 40; + if (1) { + $i += 50; + echo "damn, this shouldn't be displayed
\n"; + } else { + $j += 20; + echo "this shouldn't be displayed either
\n"; + } + } else if (1) { + $j *= $i; /* $j *= 2 --> $j == 4 */ + echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j
\n"; + echo "3 loop iterations should follow:
\n"; + while ($i<=$j) { + echo $i++." $j
\n"; + } + } + } elseif (0) { + echo "this definitely shouldn't be displayed
\n"; + } else { + echo "and this too shouldn't be displayed
\n"; + } + echo "**********************************
\n"; +} +?> + +*** C-style else-if's ***
+\n"; + } else if ($a++) { + echo "This shouldn't be displayed either
\n"; + } else if (--$a) { + echo "No, this neither
\n"; + } else if (++$a) { + echo "This should be displayed
\n"; + } else { + echo "This shouldn't be displayed at all
\n"; + } +?> +*************************
+ +*** WHILE tests ***
+$j) { + echo "$i is greater than $j
\n"; + } else if ($i==$j) { + echo "$i equals $j
\n"; + } else { + echo "$i is smaller than $j
\n"; + } + $i++; +} +?> +*******************
+ + +*** Nested WHILEs ***
+\n"; + +$i=0; +while ($i<$arr_len) { + $j=0; + while ($j<$arr_len) { + $k=0; + while ($k<$arr_len) { + echo "\${test$i$j}[$k] = ".${"test$i$j"}[$k]."
\n"; + $k++; + } + $j++; + } + $i++; +} +?> +*********************
+ +*** hash test... ***
+\n"; +} +*/ +echo "commented out..."; +?> + +**************************
+ +*** Hash resizing test ***
+ 0) { + $a = $a . 'a'; + echo "$a
\n"; + $resize[$a] = $i; + $i--; +} +$i = 10; +$a = 'b'; +while ($i > 0) { + $a = $a . 'a'; + echo "$a
\n"; + echo $resize[$a]."
\n"; + $i--; +} +?> +**************************
+ + +*** break/continue test ***
+\n"; +while ($i<5) { + if ($i>2) { + break; + } + $j=0; + echo "\$j should go from 3 to 4, and \$q should go from 3 to 4
\n"; + while ($j<5) { + if ($j<=2) { + $j++; + continue; + } + echo " \$j=$j
\n"; + for ($q=0; $q<=10; $q++) { + if ($q<3) { + continue; + } + if ($q>4) { + break; + } + echo " \$q=$q
\n"; + } + $j++; + } + $j=0; + echo "\$j should go from 0 to 2
\n"; + while ($j<5) { + if ($j>2) { + $k=0; + echo "\$k should go from 0 to 2
\n"; + while ($k<5) { + if ($k>2) { + break 2; + } + echo " \$k=$k
\n"; + $k++; + } + } + echo " \$j=$j
\n"; + $j++; + } + echo "\$i=$i
\n"; + $i++; +} +?> +***********************
+ +*** Nested file include test ***
+ +********************************
+ +\n"; # testing some PHP style comment... +} +?> diff --git a/tests/lang/023-2.inc b/tests/lang/023-2.inc new file mode 100644 index 0000000..6dd1e73 --- /dev/null +++ b/tests/lang/023-2.inc @@ -0,0 +1,6 @@ + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. + + + diff --git a/tests/lang/023.phpt b/tests/lang/023.phpt new file mode 100644 index 0000000..331308d --- /dev/null +++ b/tests/lang/023.phpt @@ -0,0 +1,256 @@ +--TEST-- +Regression test +--INI-- +date.timezone=UTC +--FILE-- +PHP Regression Test + +0) { + $days = $time_left/(24*3600); + $time_left -= $days*24*3600; + $hours = $time_left/3600; + $time_left -= $hours*3600; + $minutes = $time_left/60; + echo "Limor Ullmann is getting married on ".($wedding_date=date("l, F dS, Y",$wedding_timestamp)).",\nwhich is $days days, $hours hours and $minutes minutes from now.\n"; + echo "Her hashed wedding date is $wedding_date.\n"; +} else { + echo "Limor Ullmann is now Limor Baruch :I\n"; +} +?> +--EXPECT-- +PHP Regression Test + + + + +*** Testing assignments and variable aliasing: ***
+This should read "blah": blah
+This should read "this is nifty": this is nifty
+*************************************************
+ +*** Testing integer operators ***
+Correct result - 8: 8
+Correct result - 8: 8
+Correct result - 2: 2
+Correct result - -2: -2
+Correct result - 15: 15
+Correct result - 15: 15
+Correct result - 2: 2
+Correct result - 3: 3
+*********************************
+ +*** Testing real operators ***
+Correct result - 8: 8
+Correct result - 8: 8
+Correct result - 2: 2
+Correct result - -2: -2
+Correct result - 15: 15
+Correct result - 15: 15
+Correct result - 2: 2
+Correct result - 3: 3
+*********************************
+ +*** Testing if/elseif/else control ***
+ +This works
+this_still_works
+should_print
+ + +*** Seriously nested if's test ***
+** spelling correction by kluzz ** +Only two lines of text should follow:
+this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0
+this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4
+3 loop iterations should follow:
+2 4
+3 4
+4 4
+**********************************
+ +*** C-style else-if's ***
+This should be displayed
+*************************
+ +*** WHILE tests ***
+0 is smaller than 20
+1 is smaller than 20
+2 is smaller than 20
+3 is smaller than 20
+4 is smaller than 20
+5 is smaller than 20
+6 is smaller than 20
+7 is smaller than 20
+8 is smaller than 20
+9 is smaller than 20
+10 is smaller than 20
+11 is smaller than 20
+12 is smaller than 20
+13 is smaller than 20
+14 is smaller than 20
+15 is smaller than 20
+16 is smaller than 20
+17 is smaller than 20
+18 is smaller than 20
+19 is smaller than 20
+20 equals 20
+21 is greater than 20
+22 is greater than 20
+23 is greater than 20
+24 is greater than 20
+25 is greater than 20
+26 is greater than 20
+27 is greater than 20
+28 is greater than 20
+29 is greater than 20
+30 is greater than 20
+31 is greater than 20
+32 is greater than 20
+33 is greater than 20
+34 is greater than 20
+35 is greater than 20
+36 is greater than 20
+37 is greater than 20
+38 is greater than 20
+39 is greater than 20
+*******************
+ + +*** Nested WHILEs ***
+Each array variable should be equal to the sum of its indices:
+${test00}[0] = 0
+${test00}[1] = 1
+${test00}[2] = 2
+${test01}[0] = 1
+${test01}[1] = 2
+${test01}[2] = 3
+${test02}[0] = 2
+${test02}[1] = 3
+${test02}[2] = 4
+${test10}[0] = 1
+${test10}[1] = 2
+${test10}[2] = 3
+${test11}[0] = 2
+${test11}[1] = 3
+${test11}[2] = 4
+${test12}[0] = 3
+${test12}[1] = 4
+${test12}[2] = 5
+${test20}[0] = 2
+${test20}[1] = 3
+${test20}[2] = 4
+${test21}[0] = 3
+${test21}[1] = 4
+${test21}[2] = 5
+${test22}[0] = 4
+${test22}[1] = 5
+${test22}[2] = 6
+*********************
+ +*** hash test... ***
+commented out... +**************************
+ +*** Hash resizing test ***
+ba
+baa
+baaa
+baaaa
+baaaaa
+baaaaaa
+baaaaaaa
+baaaaaaaa
+baaaaaaaaa
+baaaaaaaaaa
+ba
+10
+baa
+9
+baaa
+8
+baaaa
+7
+baaaaa
+6
+baaaaaa
+5
+baaaaaaa
+4
+baaaaaaaa
+3
+baaaaaaaaa
+2
+baaaaaaaaaa
+1
+**************************
+ + +*** break/continue test ***
+$i should go from 0 to 2
+$j should go from 3 to 4, and $q should go from 3 to 4
+ $j=3
+ $q=3
+ $q=4
+ $j=4
+ $q=3
+ $q=4
+$j should go from 0 to 2
+ $j=0
+ $j=1
+ $j=2
+$k should go from 0 to 2
+ $k=0
+ $k=1
+ $k=2
+$i=0
+$j should go from 3 to 4, and $q should go from 3 to 4
+ $j=3
+ $q=3
+ $q=4
+ $j=4
+ $q=3
+ $q=4
+$j should go from 0 to 2
+ $j=0
+ $j=1
+ $j=2
+$k should go from 0 to 2
+ $k=0
+ $k=1
+ $k=2
+$i=1
+$j should go from 3 to 4, and $q should go from 3 to 4
+ $j=3
+ $q=3
+ $q=4
+ $j=4
+ $q=3
+ $q=4
+$j should go from 0 to 2
+ $j=0
+ $j=1
+ $j=2
+$k should go from 0 to 2
+ $k=0
+ $k=1
+ $k=2
+$i=2
+***********************
+ +*** Nested file include test ***
+ +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +********************************
+ +Tests completed.
+Limor Ullmann is now Limor Baruch :I diff --git a/tests/lang/024.phpt b/tests/lang/024.phpt new file mode 100644 index 0000000..954b58f --- /dev/null +++ b/tests/lang/024.phpt @@ -0,0 +1,11623 @@ +--TEST-- +Looped regression test (may take a while) +--FILE-- + + + +*** Testing assignments and variable aliasing: *** + +This should read "blah": +This should read "this is nifty": +************************************************* + +*** Testing integer operators *** + +Correct result - 8: + +Correct result - 8: + +Correct result - 2: + +Correct result - -2: + +Correct result - 15: + +Correct result - 15: + +Correct result - 2: + +Correct result - 3: + +********************************* + +*** Testing real operators *** + +Correct result - 8: + +Correct result - 8: + +Correct result - 2: + +Correct result - -2: + +Correct result - 15: + +Correct result - 15: + +Correct result - 2: + +Correct result - 3: + +********************************* + +*** Testing if/elseif/else control *** + + + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +0) { + $j--; + } + } +} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */ + $i = ++$j; + echo "hmm, this shouldn't be displayed #2\n"; + if (1) { + $j = ++$i; + if (0) { + $j = $i*2+$j*($i++); + if (1) { + $i++; + echo "damn, this shouldn't be displayed\n"; + } else { + $j++; + echo "this shouldn't be displayed either\n"; + } + } else if (1) { + ++$j; + echo "this isn't supposed to be displayed\n"; + } + } elseif (0) { + $j++; + echo "this definitely shouldn't be displayed\n"; + } else { + $i++; + echo "and this too shouldn't be displayed\n"; + } +} else { + $j=$i++; /* this should set $i to 1, but shouldn't change $j (it's assigned $i's previous values, zero) */ + echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j\n"; + if (1) { + $j += ++$i; /* ++$i --> $i==2, $j += 2 --> $j==2 */ + if (0) { + $j += 40; + if (1) { + $i += 50; + echo "damn, this shouldn't be displayed\n"; + } else { + $j += 20; + echo "this shouldn't be displayed either\n"; + } + } else if (1) { + $j *= $i; /* $j *= 2 --> $j == 4 */ + echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j\n"; + echo "3 loop iterations should follow:\n"; + while ($i<=$j) { + echo $i++." $j\n"; + } + } + } elseif (0) { + echo "this definitely shouldn't be displayed\n"; + } else { + echo "and this too shouldn't be displayed\n"; + } + echo "**********************************\n"; +} +?> + +*** C-style else-if's *** + +************************* + +*** WHILE tests *** +$j) { + echo "$i is greater than $j\n"; + } else if ($i==$j) { + echo "$i equals $j\n"; + } else { + echo "$i is smaller than $j\n"; + } + $i++; +} +?> +******************* + + +*** Nested WHILEs *** + +********************* + +*** hash test... *** + + +************************** + +*** Hash resizing test *** + 0) { + $a = $a . "a"; + echo "$a\n"; + $resize[$a] = $i; + $i--; +} +$i = 10; +$a = "b"; +while ($i > 0) { + $a = $a . "a"; + echo "$a\n"; + echo $resize[$a]."\n"; + $i--; +} +?> +************************** + + +*** break/continue test *** +2) { + break; + } + $j=0; + echo "\$j should go from 3 to 4, and \$q should go from 3 to 4\n"; + while ($j<5) { + if ($j<=2) { + $j++; + continue; + } + echo " \$j=$j\n"; + for ($q=0; $q<=10; $q++) { + if ($q<3) { + continue; + } + if ($q>4) { + break; + } + echo " \$q=$q\n"; + } + $j++; + } + $j=0; + echo "\$j should go from 0 to 2\n"; + while ($j<5) { + if ($j>2) { + $k=0; + echo "\$k should go from 0 to 2\n"; + while ($k<5) { + if ($k>2) { + break 2; + } + echo " \$k=$k\n"; + $k++; + } + } + echo " \$j=$j\n"; + $j++; + } + echo "\$i=$i\n"; + $i++; +} +?> +*********************** + +*** Nested file include test *** + +******************************** + + +--EXPECT-- + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. + + +*** Testing assignments and variable aliasing: *** +This should read "blah": blah +This should read "this is nifty": this is nifty +************************************************* + +*** Testing integer operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing real operators *** +Correct result - 8: 8 +Correct result - 8: 8 +Correct result - 2: 2 +Correct result - -2: -2 +Correct result - 15: 15 +Correct result - 15: 15 +Correct result - 2: 2 +Correct result - 3: 3 +********************************* + +*** Testing if/elseif/else control *** + +This works +this_still_works +should_print + + +*** Seriously nested if's test *** +** spelling correction by kluzz ** +Only two lines of text should follow: +this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0 +this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4 +3 loop iterations should follow: +2 4 +3 4 +4 4 +********************************** + +*** C-style else-if's *** +This should be displayed +************************* + +*** WHILE tests *** +0 is smaller than 20 +1 is smaller than 20 +2 is smaller than 20 +3 is smaller than 20 +4 is smaller than 20 +5 is smaller than 20 +6 is smaller than 20 +7 is smaller than 20 +8 is smaller than 20 +9 is smaller than 20 +10 is smaller than 20 +11 is smaller than 20 +12 is smaller than 20 +13 is smaller than 20 +14 is smaller than 20 +15 is smaller than 20 +16 is smaller than 20 +17 is smaller than 20 +18 is smaller than 20 +19 is smaller than 20 +20 equals 20 +21 is greater than 20 +22 is greater than 20 +23 is greater than 20 +24 is greater than 20 +25 is greater than 20 +26 is greater than 20 +27 is greater than 20 +28 is greater than 20 +29 is greater than 20 +30 is greater than 20 +31 is greater than 20 +32 is greater than 20 +33 is greater than 20 +34 is greater than 20 +35 is greater than 20 +36 is greater than 20 +37 is greater than 20 +38 is greater than 20 +39 is greater than 20 +******************* + + +*** Nested WHILEs *** +Each array variable should be equal to the sum of its indices: +${test00}[0] = 0 +${test00}[1] = 1 +${test00}[2] = 2 +${test01}[0] = 1 +${test01}[1] = 2 +${test01}[2] = 3 +${test02}[0] = 2 +${test02}[1] = 3 +${test02}[2] = 4 +${test10}[0] = 1 +${test10}[1] = 2 +${test10}[2] = 3 +${test11}[0] = 2 +${test11}[1] = 3 +${test11}[2] = 4 +${test12}[0] = 3 +${test12}[1] = 4 +${test12}[2] = 5 +${test20}[0] = 2 +${test20}[1] = 3 +${test20}[2] = 4 +${test21}[0] = 3 +${test21}[1] = 4 +${test21}[2] = 5 +${test22}[0] = 4 +${test22}[1] = 5 +${test22}[2] = 6 +********************* + +*** hash test... *** +commented out... +************************** + +*** Hash resizing test *** +ba +baa +baaa +baaaa +baaaaa +baaaaaa +baaaaaaa +baaaaaaaa +baaaaaaaaa +baaaaaaaaaa +ba +10 +baa +9 +baaa +8 +baaaa +7 +baaaaa +6 +baaaaaa +5 +baaaaaaa +4 +baaaaaaaa +3 +baaaaaaaaa +2 +baaaaaaaaaa +1 +************************** + + +*** break/continue test *** +$i should go from 0 to 2 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=0 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=1 +$j should go from 3 to 4, and $q should go from 3 to 4 + $j=3 + $q=3 + $q=4 + $j=4 + $q=3 + $q=4 +$j should go from 0 to 2 + $j=0 + $j=1 + $j=2 +$k should go from 0 to 2 + $k=0 + $k=1 + $k=2 +$i=2 +*********************** + +*** Nested file include test *** + +This is Finish.phtml. This file is supposed to be included +from regression_test.phtml. This is normal HTML. +and this is PHP code, 2+2=4 + +******************************** + +Tests completed. diff --git a/tests/lang/025.phpt b/tests/lang/025.phpt new file mode 100644 index 0000000..382960f --- /dev/null +++ b/tests/lang/025.phpt @@ -0,0 +1,531 @@ +--TEST-- +Mean recursion test +--FILE-- + +--EXPECT-- + 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 3 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 2 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 3 a 3 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 4 a 4 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 5 a 5 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 6 a 6 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 7 a 7 a 8 a 9 + b 10 + b 9 a 9 + b 10 + b 8 a 8 a 9 + b 10 + b 9 a 9 + b 10 diff --git a/tests/lang/026.phpt b/tests/lang/026.phpt new file mode 100644 index 0000000..eb2d621 --- /dev/null +++ b/tests/lang/026.phpt @@ -0,0 +1,6 @@ +--TEST-- +Testing string scanner confirmance +--FILE-- + +--EXPECT-- +" \'\n\'a\\b\ diff --git a/tests/lang/027.phpt b/tests/lang/027.phpt new file mode 100644 index 0000000..d3eb74b --- /dev/null +++ b/tests/lang/027.phpt @@ -0,0 +1,12 @@ +--TEST-- +Testing do-while loop +--FILE-- +0); +?> +--EXPECT-- +321 diff --git a/tests/lang/028.phpt b/tests/lang/028.phpt new file mode 100644 index 0000000..bd4525e --- /dev/null +++ b/tests/lang/028.phpt @@ -0,0 +1,1058 @@ +--TEST-- +Testing calling user-level functions from C +--FILE-- +myname = "Dafna"; + } + function GetMyName() { + return $this->myname; + } + function SetMyName($name) { + $this->myname = $name; + } +}; + +for ($i=0; $i<200; $i++): + print "$i\n"; + call_user_func("dafna"); + call_user_func("print_stuff","Hey there!!\n"); + print "$i\n"; +endfor; + + +$dafna = new dafna_class(); + +print $name=call_user_func(array(&$dafna,"GetMyName")); +print "\n"; + +?> +--EXPECT-- +0 +Dafna! +I'm still alive +Hey there!! +0 +1 +Dafna! +I'm still alive +Hey there!! +1 +2 +Dafna! +I'm still alive +Hey there!! +2 +3 +Dafna! +I'm still alive +Hey there!! +3 +4 +Dafna! +I'm still alive +Hey there!! +4 +5 +Dafna! +I'm still alive +Hey there!! +5 +6 +Dafna! +I'm still alive +Hey there!! +6 +7 +Dafna! +I'm still alive +Hey there!! +7 +8 +Dafna! +I'm still alive +Hey there!! +8 +9 +Dafna! +I'm still alive +Hey there!! +9 +10 +Dafna! +I'm still alive +Hey there!! +10 +11 +Dafna! +I'm still alive +Hey there!! +11 +12 +Dafna! +I'm still alive +Hey there!! +12 +13 +Dafna! +I'm still alive +Hey there!! +13 +14 +Dafna! +I'm still alive +Hey there!! +14 +15 +Dafna! +I'm still alive +Hey there!! +15 +16 +Dafna! +I'm still alive +Hey there!! +16 +17 +Dafna! +I'm still alive +Hey there!! +17 +18 +Dafna! +I'm still alive +Hey there!! +18 +19 +Dafna! +I'm still alive +Hey there!! +19 +20 +Dafna! +I'm still alive +Hey there!! +20 +21 +Dafna! +I'm still alive +Hey there!! +21 +22 +Dafna! +I'm still alive +Hey there!! +22 +23 +Dafna! +I'm still alive +Hey there!! +23 +24 +Dafna! +I'm still alive +Hey there!! +24 +25 +Dafna! +I'm still alive +Hey there!! +25 +26 +Dafna! +I'm still alive +Hey there!! +26 +27 +Dafna! +I'm still alive +Hey there!! +27 +28 +Dafna! +I'm still alive +Hey there!! +28 +29 +Dafna! +I'm still alive +Hey there!! +29 +30 +Dafna! +I'm still alive +Hey there!! +30 +31 +Dafna! +I'm still alive +Hey there!! +31 +32 +Dafna! +I'm still alive +Hey there!! +32 +33 +Dafna! +I'm still alive +Hey there!! +33 +34 +Dafna! +I'm still alive +Hey there!! +34 +35 +Dafna! +I'm still alive +Hey there!! +35 +36 +Dafna! +I'm still alive +Hey there!! +36 +37 +Dafna! +I'm still alive +Hey there!! +37 +38 +Dafna! +I'm still alive +Hey there!! +38 +39 +Dafna! +I'm still alive +Hey there!! +39 +40 +Dafna! +I'm still alive +Hey there!! +40 +41 +Dafna! +I'm still alive +Hey there!! +41 +42 +Dafna! +I'm still alive +Hey there!! +42 +43 +Dafna! +I'm still alive +Hey there!! +43 +44 +Dafna! +I'm still alive +Hey there!! +44 +45 +Dafna! +I'm still alive +Hey there!! +45 +46 +Dafna! +I'm still alive +Hey there!! +46 +47 +Dafna! +I'm still alive +Hey there!! +47 +48 +Dafna! +I'm still alive +Hey there!! +48 +49 +Dafna! +I'm still alive +Hey there!! +49 +50 +Dafna! +I'm still alive +Hey there!! +50 +51 +Dafna! +I'm still alive +Hey there!! +51 +52 +Dafna! +I'm still alive +Hey there!! +52 +53 +Dafna! +I'm still alive +Hey there!! +53 +54 +Dafna! +I'm still alive +Hey there!! +54 +55 +Dafna! +I'm still alive +Hey there!! +55 +56 +Dafna! +I'm still alive +Hey there!! +56 +57 +Dafna! +I'm still alive +Hey there!! +57 +58 +Dafna! +I'm still alive +Hey there!! +58 +59 +Dafna! +I'm still alive +Hey there!! +59 +60 +Dafna! +I'm still alive +Hey there!! +60 +61 +Dafna! +I'm still alive +Hey there!! +61 +62 +Dafna! +I'm still alive +Hey there!! +62 +63 +Dafna! +I'm still alive +Hey there!! +63 +64 +Dafna! +I'm still alive +Hey there!! +64 +65 +Dafna! +I'm still alive +Hey there!! +65 +66 +Dafna! +I'm still alive +Hey there!! +66 +67 +Dafna! +I'm still alive +Hey there!! +67 +68 +Dafna! +I'm still alive +Hey there!! +68 +69 +Dafna! +I'm still alive +Hey there!! +69 +70 +Dafna! +I'm still alive +Hey there!! +70 +71 +Dafna! +I'm still alive +Hey there!! +71 +72 +Dafna! +I'm still alive +Hey there!! +72 +73 +Dafna! +I'm still alive +Hey there!! +73 +74 +Dafna! +I'm still alive +Hey there!! +74 +75 +Dafna! +I'm still alive +Hey there!! +75 +76 +Dafna! +I'm still alive +Hey there!! +76 +77 +Dafna! +I'm still alive +Hey there!! +77 +78 +Dafna! +I'm still alive +Hey there!! +78 +79 +Dafna! +I'm still alive +Hey there!! +79 +80 +Dafna! +I'm still alive +Hey there!! +80 +81 +Dafna! +I'm still alive +Hey there!! +81 +82 +Dafna! +I'm still alive +Hey there!! +82 +83 +Dafna! +I'm still alive +Hey there!! +83 +84 +Dafna! +I'm still alive +Hey there!! +84 +85 +Dafna! +I'm still alive +Hey there!! +85 +86 +Dafna! +I'm still alive +Hey there!! +86 +87 +Dafna! +I'm still alive +Hey there!! +87 +88 +Dafna! +I'm still alive +Hey there!! +88 +89 +Dafna! +I'm still alive +Hey there!! +89 +90 +Dafna! +I'm still alive +Hey there!! +90 +91 +Dafna! +I'm still alive +Hey there!! +91 +92 +Dafna! +I'm still alive +Hey there!! +92 +93 +Dafna! +I'm still alive +Hey there!! +93 +94 +Dafna! +I'm still alive +Hey there!! +94 +95 +Dafna! +I'm still alive +Hey there!! +95 +96 +Dafna! +I'm still alive +Hey there!! +96 +97 +Dafna! +I'm still alive +Hey there!! +97 +98 +Dafna! +I'm still alive +Hey there!! +98 +99 +Dafna! +I'm still alive +Hey there!! +99 +100 +Dafna! +I'm still alive +Hey there!! +100 +101 +Dafna! +I'm still alive +Hey there!! +101 +102 +Dafna! +I'm still alive +Hey there!! +102 +103 +Dafna! +I'm still alive +Hey there!! +103 +104 +Dafna! +I'm still alive +Hey there!! +104 +105 +Dafna! +I'm still alive +Hey there!! +105 +106 +Dafna! +I'm still alive +Hey there!! +106 +107 +Dafna! +I'm still alive +Hey there!! +107 +108 +Dafna! +I'm still alive +Hey there!! +108 +109 +Dafna! +I'm still alive +Hey there!! +109 +110 +Dafna! +I'm still alive +Hey there!! +110 +111 +Dafna! +I'm still alive +Hey there!! +111 +112 +Dafna! +I'm still alive +Hey there!! +112 +113 +Dafna! +I'm still alive +Hey there!! +113 +114 +Dafna! +I'm still alive +Hey there!! +114 +115 +Dafna! +I'm still alive +Hey there!! +115 +116 +Dafna! +I'm still alive +Hey there!! +116 +117 +Dafna! +I'm still alive +Hey there!! +117 +118 +Dafna! +I'm still alive +Hey there!! +118 +119 +Dafna! +I'm still alive +Hey there!! +119 +120 +Dafna! +I'm still alive +Hey there!! +120 +121 +Dafna! +I'm still alive +Hey there!! +121 +122 +Dafna! +I'm still alive +Hey there!! +122 +123 +Dafna! +I'm still alive +Hey there!! +123 +124 +Dafna! +I'm still alive +Hey there!! +124 +125 +Dafna! +I'm still alive +Hey there!! +125 +126 +Dafna! +I'm still alive +Hey there!! +126 +127 +Dafna! +I'm still alive +Hey there!! +127 +128 +Dafna! +I'm still alive +Hey there!! +128 +129 +Dafna! +I'm still alive +Hey there!! +129 +130 +Dafna! +I'm still alive +Hey there!! +130 +131 +Dafna! +I'm still alive +Hey there!! +131 +132 +Dafna! +I'm still alive +Hey there!! +132 +133 +Dafna! +I'm still alive +Hey there!! +133 +134 +Dafna! +I'm still alive +Hey there!! +134 +135 +Dafna! +I'm still alive +Hey there!! +135 +136 +Dafna! +I'm still alive +Hey there!! +136 +137 +Dafna! +I'm still alive +Hey there!! +137 +138 +Dafna! +I'm still alive +Hey there!! +138 +139 +Dafna! +I'm still alive +Hey there!! +139 +140 +Dafna! +I'm still alive +Hey there!! +140 +141 +Dafna! +I'm still alive +Hey there!! +141 +142 +Dafna! +I'm still alive +Hey there!! +142 +143 +Dafna! +I'm still alive +Hey there!! +143 +144 +Dafna! +I'm still alive +Hey there!! +144 +145 +Dafna! +I'm still alive +Hey there!! +145 +146 +Dafna! +I'm still alive +Hey there!! +146 +147 +Dafna! +I'm still alive +Hey there!! +147 +148 +Dafna! +I'm still alive +Hey there!! +148 +149 +Dafna! +I'm still alive +Hey there!! +149 +150 +Dafna! +I'm still alive +Hey there!! +150 +151 +Dafna! +I'm still alive +Hey there!! +151 +152 +Dafna! +I'm still alive +Hey there!! +152 +153 +Dafna! +I'm still alive +Hey there!! +153 +154 +Dafna! +I'm still alive +Hey there!! +154 +155 +Dafna! +I'm still alive +Hey there!! +155 +156 +Dafna! +I'm still alive +Hey there!! +156 +157 +Dafna! +I'm still alive +Hey there!! +157 +158 +Dafna! +I'm still alive +Hey there!! +158 +159 +Dafna! +I'm still alive +Hey there!! +159 +160 +Dafna! +I'm still alive +Hey there!! +160 +161 +Dafna! +I'm still alive +Hey there!! +161 +162 +Dafna! +I'm still alive +Hey there!! +162 +163 +Dafna! +I'm still alive +Hey there!! +163 +164 +Dafna! +I'm still alive +Hey there!! +164 +165 +Dafna! +I'm still alive +Hey there!! +165 +166 +Dafna! +I'm still alive +Hey there!! +166 +167 +Dafna! +I'm still alive +Hey there!! +167 +168 +Dafna! +I'm still alive +Hey there!! +168 +169 +Dafna! +I'm still alive +Hey there!! +169 +170 +Dafna! +I'm still alive +Hey there!! +170 +171 +Dafna! +I'm still alive +Hey there!! +171 +172 +Dafna! +I'm still alive +Hey there!! +172 +173 +Dafna! +I'm still alive +Hey there!! +173 +174 +Dafna! +I'm still alive +Hey there!! +174 +175 +Dafna! +I'm still alive +Hey there!! +175 +176 +Dafna! +I'm still alive +Hey there!! +176 +177 +Dafna! +I'm still alive +Hey there!! +177 +178 +Dafna! +I'm still alive +Hey there!! +178 +179 +Dafna! +I'm still alive +Hey there!! +179 +180 +Dafna! +I'm still alive +Hey there!! +180 +181 +Dafna! +I'm still alive +Hey there!! +181 +182 +Dafna! +I'm still alive +Hey there!! +182 +183 +Dafna! +I'm still alive +Hey there!! +183 +184 +Dafna! +I'm still alive +Hey there!! +184 +185 +Dafna! +I'm still alive +Hey there!! +185 +186 +Dafna! +I'm still alive +Hey there!! +186 +187 +Dafna! +I'm still alive +Hey there!! +187 +188 +Dafna! +I'm still alive +Hey there!! +188 +189 +Dafna! +I'm still alive +Hey there!! +189 +190 +Dafna! +I'm still alive +Hey there!! +190 +191 +Dafna! +I'm still alive +Hey there!! +191 +192 +Dafna! +I'm still alive +Hey there!! +192 +193 +Dafna! +I'm still alive +Hey there!! +193 +194 +Dafna! +I'm still alive +Hey there!! +194 +195 +Dafna! +I'm still alive +Hey there!! +195 +196 +Dafna! +I'm still alive +Hey there!! +196 +197 +Dafna! +I'm still alive +Hey there!! +197 +198 +Dafna! +I'm still alive +Hey there!! +198 +199 +Dafna! +I'm still alive +Hey there!! +199 +Dafna + diff --git a/tests/lang/030.phpt b/tests/lang/030.phpt new file mode 100644 index 0000000..758369b --- /dev/null +++ b/tests/lang/030.phpt @@ -0,0 +1,36 @@ +--TEST-- +$this in constructor test +--FILE-- +Name = $name; + $GLOBALS['List']->echoName(); + } + + function echoName() { + $GLOBALS['names'][]=$this->Name; + } +} + +function &foo2(&$foo) { + return $foo; +} + + +$bar1 =new foo('constructor'); +$bar1->Name = 'outside'; +$bar1->echoName(); +$List->echoName(); + +$bar1 =& foo2(new foo('constructor')); +$bar1->Name = 'outside'; +$bar1->echoName(); + +$List->echoName(); + +print ($names==array('constructor','outside','outside','constructor','outside','outside')) ? 'success':'failure'; +?> +--EXPECT-- +success diff --git a/tests/lang/031.phpt b/tests/lang/031.phpt new file mode 100644 index 0000000..b2d1e63 --- /dev/null +++ b/tests/lang/031.phpt @@ -0,0 +1,70 @@ +--TEST-- +Bug #16227 (Internal hash position bug on assignment) +--FILE-- + +--EXPECT-- +Correct - with inner loop reset. +inloop 0 for key1 +inloop 1 for key1 +inloop 0 for key2 +inloop 1 for key2 +What happens without inner loop reset. +inloop 0 for key1 +inloop 1 for key1 +What happens without inner loop reset but copy. +inloop 0 for key1 +inloop 1 for key1 +inloop 0 for key2 +inloop 1 for key2 +What happens with inner loop reset over copy. +inloop 0 for key1 +inloop 1 for key1 +inloop 0 for key2 +inloop 1 for key2 diff --git a/tests/lang/032.phpt b/tests/lang/032.phpt new file mode 100644 index 0000000..caa4c7e --- /dev/null +++ b/tests/lang/032.phpt @@ -0,0 +1,36 @@ +--TEST-- +Class method registration +--FILE-- + +--EXPECT-- +OK + diff --git a/tests/lang/033.phpt b/tests/lang/033.phpt new file mode 100644 index 0000000..21e3768 --- /dev/null +++ b/tests/lang/033.phpt @@ -0,0 +1,47 @@ +--TEST-- +Alternative syntaxes test +--FILE-- + + +===DONE=== +--EXPECT-- +If: 11 +While: 12346789 +For: 0123401234 +Switch: 1 +===DONE=== diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt new file mode 100644 index 0000000..cea0797 --- /dev/null +++ b/tests/lang/034.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #12647 (Locale settings affecting float parsing) +--INI-- +precision=14 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +3,14 diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt new file mode 100644 index 0000000..9472999 --- /dev/null +++ b/tests/lang/035.phpt @@ -0,0 +1,38 @@ +--TEST-- +ZE2: set_exception_handler() +--SKIPIF-- + +--FILE-- +error = $_error; + } + + function getException() + { + return $this->error; + } +} + +function ThrowException() +{ + throw new MyException("'This is an exception!'"); +} + + +try { +} catch (MyException $exception) { + print "There shouldn't be an exception: " . $exception->getException(); + print "\n"; +} + +try { + ThrowException(); +} catch (MyException $exception) { + print "There was an exception: " . $exception->getException(); + print "\n"; +} +?> +--EXPECT-- +There was an exception: 'This is an exception!' diff --git a/tests/lang/036.phpt b/tests/lang/036.phpt new file mode 100644 index 0000000..474316e --- /dev/null +++ b/tests/lang/036.phpt @@ -0,0 +1,27 @@ +--TEST-- +Child public element should not override parent private element in parent methods +--FILE-- +id; + } +}; + +class chld extends par { + public $id = "bar"; + function displayHim() + { + parent::displayMe(); + } +}; + + +$obj = new chld(); +$obj->displayHim(); +?> +--EXPECT-- +foo diff --git a/tests/lang/037.phpt b/tests/lang/037.phpt new file mode 100644 index 0000000..c2a1ee3 --- /dev/null +++ b/tests/lang/037.phpt @@ -0,0 +1,30 @@ +--TEST-- +'Static' binding for private variables +--FILE-- +displayChild(); + } +}; + +class chld extends par { + private $id = "bar"; + + function displayChild() + { + print $this->id; + } +}; + + +$obj = new chld(); +$obj->displayMe(); + +?> +--EXPECT-- +bar diff --git a/tests/lang/038.phpt b/tests/lang/038.phpt new file mode 100644 index 0000000..195050b --- /dev/null +++ b/tests/lang/038.phpt @@ -0,0 +1,41 @@ +--TEST-- +Convert warnings to exceptions +--FILE-- +file = $errfile; + $this->line = $errline; + } +} + +function Error2Exception($errno, $errstr, $errfile, $errline) +{ + throw new MyException($errstr, $errno);//, $errfile, $errline); +} + +$err_msg = 'no exception'; +set_error_handler('Error2Exception'); + +try +{ + $con = fopen("/tmp/a_file_that_does_not_exist",'r'); +} +catch (Exception $e) +{ + $trace = $e->getTrace(); + var_dump($trace[0]['function']); + var_dump($trace[1]['function']); +} + +?> +===DONE=== + +--EXPECTF-- +string(15) "Error2Exception" +string(5) "fopen" +===DONE=== diff --git a/tests/lang/039.phpt b/tests/lang/039.phpt new file mode 100644 index 0000000..aa4b591 --- /dev/null +++ b/tests/lang/039.phpt @@ -0,0 +1,45 @@ +--TEST-- +Catch Interfaces +--FILE-- +file = $errfile; + $this->line = $errline; + } +} + +function Error2Exception($errno, $errstr, $errfile, $errline) +{ + throw new MyException($errstr, $errno, $errfile, $errline); +} + +$err_msg = 'no exception'; +set_error_handler('Error2Exception'); + +try +{ + $con = fopen('/tmp/a_file_that_does_not_exist','r'); +} +catch (Catchable $e) +{ + echo "Catchable\n"; +} +catch (Exception $e) +{ + echo "Exception\n"; +} + +?> +===DONE=== +--EXPECTF-- +Catchable +===DONE=== diff --git a/tests/lang/040.phpt b/tests/lang/040.phpt new file mode 100644 index 0000000..6d8ece9 --- /dev/null +++ b/tests/lang/040.phpt @@ -0,0 +1,15 @@ +--TEST-- +foreach into array +--FILE-- + +===DONE=== +--EXPECT-- +0 +1 +===DONE=== diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt new file mode 100644 index 0000000..6972412 --- /dev/null +++ b/tests/lang/041.phpt @@ -0,0 +1,20 @@ +--TEST-- +Dynamic access of static members +--FILE-- + +===DONE=== +--EXPECTF-- +foo + +Fatal error: Class 'B' not found in %s041.php on line %d diff --git a/tests/lang/042.phpt b/tests/lang/042.phpt new file mode 100644 index 0000000..217aab8 --- /dev/null +++ b/tests/lang/042.phpt @@ -0,0 +1,19 @@ +--TEST-- +Dynamic access of constants +--FILE-- + +===DONE=== +--EXPECTF-- +foo + +Fatal error: Class 'B' not found in %s042.php on line %d diff --git a/tests/lang/043.phpt b/tests/lang/043.phpt new file mode 100644 index 0000000..7ca2d74 --- /dev/null +++ b/tests/lang/043.phpt @@ -0,0 +1,19 @@ +--TEST-- +Dynamic call for static methods +--FILE-- + +===DONE=== +--EXPECTF-- +foo + +Fatal error: Class 'B' not found in %s043.php on line %d diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt new file mode 100644 index 0000000..a0de889 --- /dev/null +++ b/tests/lang/044.phpt @@ -0,0 +1,21 @@ +--TEST-- +Dynamic call for static methods dynamically named +--FILE-- + +===DONE=== +--EXPECTF-- +foo + +Fatal error: Class 'B' not found in %s044.php on line %d diff --git a/tests/lang/045.phpt b/tests/lang/045.phpt new file mode 100644 index 0000000..11598cf --- /dev/null +++ b/tests/lang/045.phpt @@ -0,0 +1,27 @@ +--TEST-- +Timeout again inside register_shutdown_function +--SKIPIF-- + +--FILE-- + 2) { + echo "Failed!"; + break; + } + } +} +plop(); +?> +===DONE=== +--EXPECTF-- +Fatal error: Maximum execution time of 1 second exceeded in %s on line %d + +Fatal error: Maximum execution time of 1 second exceeded in %s on line %d diff --git a/tests/lang/array_shortcut_001.phpt b/tests/lang/array_shortcut_001.phpt new file mode 100644 index 0000000..18a10ea --- /dev/null +++ b/tests/lang/array_shortcut_001.phpt @@ -0,0 +1,13 @@ +--TEST-- +Square bracket array shortcut test +--FILE-- + +--EXPECT-- +Array +( + [0] => 1 + [1] => 2 + [2] => 3 +) diff --git a/tests/lang/array_shortcut_002.phpt b/tests/lang/array_shortcut_002.phpt new file mode 100644 index 0000000..25aee9b --- /dev/null +++ b/tests/lang/array_shortcut_002.phpt @@ -0,0 +1,13 @@ +--TEST-- +Square bracket associative array shortcut test +--FILE-- + "orange", "bar" => "apple", "baz" => "lemon"]); +?> +--EXPECT-- +Array +( + [foo] => orange + [bar] => apple + [baz] => lemon +) diff --git a/tests/lang/array_shortcut_003.phpt b/tests/lang/array_shortcut_003.phpt new file mode 100644 index 0000000..75e428b --- /dev/null +++ b/tests/lang/array_shortcut_003.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing array shortcut and bracket operator +--FILE-- + +--EXPECT-- +Array +( + [0] => 2 + [1] => 4 +) diff --git a/tests/lang/array_shortcut_005.phpt b/tests/lang/array_shortcut_005.phpt new file mode 100644 index 0000000..7cc7386 --- /dev/null +++ b/tests/lang/array_shortcut_005.phpt @@ -0,0 +1,20 @@ +--TEST-- +Testing nested array shortcut +--FILE-- + "orange", "bar" => "apple", "baz" => "lemon"]]); +?> +--EXPECT-- +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => Array + ( + [foo] => orange + [bar] => apple + [baz] => lemon + ) + +) diff --git a/tests/lang/bison1.phpt b/tests/lang/bison1.phpt new file mode 100644 index 0000000..3571576 --- /dev/null +++ b/tests/lang/bison1.phpt @@ -0,0 +1,9 @@ +--TEST-- +Bison weirdness +--FILE-- + +--EXPECT-- +blah- diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt new file mode 100644 index 0000000..0cb3bf4 --- /dev/null +++ b/tests/lang/bug17115.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #17115 (lambda functions produce segfault with static vars) +--FILE-- + +--EXPECT-- +int(0) +int(1) +int(2) diff --git a/tests/lang/bug18872.phpt b/tests/lang/bug18872.phpt new file mode 100644 index 0000000..2e3dc22 --- /dev/null +++ b/tests/lang/bug18872.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #18872 (class constant used as default parameter) +--FILE-- + +--EXPECT-- +3 +3 diff --git a/tests/lang/bug19566.phpt b/tests/lang/bug19566.phpt new file mode 100644 index 0000000..45c3bc5 --- /dev/null +++ b/tests/lang/bug19566.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #19566 (get_declared_classes() segfaults) +--FILE-- + +--EXPECTF-- +int(%d) diff --git a/tests/lang/bug19943.phpt b/tests/lang/bug19943.phpt new file mode 100644 index 0000000..c951190 --- /dev/null +++ b/tests/lang/bug19943.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #19943 (memleaks) +--FILE-- + +--EXPECT-- +0 -- 0 +1 -- 1 +2 -- 2 +3 -- 3 +4 -- 4 +5 -- 5 +6 -- 6 +7 -- 7 +8 -- 8 +9 -- 9 +string(10) "0123456780" diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt new file mode 100644 index 0000000..7c6ec78 --- /dev/null +++ b/tests/lang/bug20175.phpt @@ -0,0 +1,169 @@ +--TEST-- +Bug #20175 (Static vars can't store ref to new instance) +--SKIPIF-- + +--INI-- +error_reporting=E_ALL | E_STRICT | E_DEPRECATED +--FILE-- +oop_name = 'oop:' . ++$oop_global; + } +} + +class oop_test { + static $oop_value; + + function oop_test() { + echo "oop_test()\n"; + } + + function oop_static() { + echo "oop_static()\n"; + if (!isset(self::$oop_value)) { + self::$oop_value = & new oop_class; + } + echo self::$oop_value->oop_name; + } +} + +print foo_static()."\n"; +print foo_static()."\n"; +print bar_static()."\n"; +print bar_static()."\n"; +//print wow_static()."\n"; +//print wow_static()."\n"; +echo "wow_static() +wow_global() +wow:1 +wow_static() +wow:1 +"; +$oop_tester = new oop_test; +print $oop_tester->oop_static()."\n"; +print $oop_tester->oop_static()."\n"; +$oop_tester = new oop_test; // repeated. +print $oop_tester->oop_static()."\n"; +?> +--EXPECTF-- +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line %d +%s +foo_static() +foo_global() +foo:1 +foo_static() +foo:1 +bar_static() +bar_global() + +Strict Standards: Only variables should be assigned by reference in %sbug20175.php on line 47 +bar:1 +bar_static() +bar:1 +wow_static() +wow_global() +wow:1 +wow_static() +wow:1 +oop_test() +oop_static() +oop_class() +oop:1 +oop_static() +oop:1 +oop_test() +oop_static() +oop:1 diff --git a/tests/lang/bug21094.phpt b/tests/lang/bug21094.phpt new file mode 100644 index 0000000..266a1d6 --- /dev/null +++ b/tests/lang/bug21094.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #21094 (set_error_handler not accepting methods) +--FILE-- + +--EXPECTF-- +[1024] errstr: test, errfile: %s, errline: %d + diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt new file mode 100644 index 0000000..6ecf69a --- /dev/null +++ b/tests/lang/bug21600.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #21600 (assign by reference function call changes variable contents) +--INI-- +error_reporting=4095 +--FILE-- + +--EXPECTF-- +Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4 +array(1) { + ["foo"]=> + string(4) "test" +} + +Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11 +array(1) { + ["foo"]=> + string(4) "test" +} diff --git a/tests/lang/bug21669.phpt b/tests/lang/bug21669.phpt new file mode 100644 index 0000000..643b069 --- /dev/null +++ b/tests/lang/bug21669.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #21669 ("$obj = new $this->var;" doesn't work) +--FILE-- +name; /* Parse error */ + return $obj; + } +} +$factory = new Factory; +$test = $factory->create(); +$test->say_hello(); +?> +--EXPECT-- +Hello world diff --git a/tests/lang/bug21820.phpt b/tests/lang/bug21820.phpt new file mode 100644 index 0000000..cbf466e --- /dev/null +++ b/tests/lang/bug21820.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #21820 ("$arr['foo']" generates bogus E_NOTICE, should be E_PARSE) +--FILE-- + 'bar'); +echo "$arr['foo']"; + +?> +--EXPECTF-- +Parse error: %s error, %s(T_STRING)%s(T_VARIABLE)%s(T_NUM_STRING)%sin %sbug21820.php on line %d diff --git a/tests/lang/bug21849.phpt b/tests/lang/bug21849.phpt new file mode 100644 index 0000000..30b3113 --- /dev/null +++ b/tests/lang/bug21849.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #21849 (self::constant doesn't work as method's default parameter) +--FILE-- + +--EXPECT-- +fubar diff --git a/tests/lang/bug21961.phpt b/tests/lang/bug21961.phpt new file mode 100644 index 0000000..24581d6 --- /dev/null +++ b/tests/lang/bug21961.phpt @@ -0,0 +1,58 @@ +--TEST-- +Bug #21961 (get_parent_class() segfault) +--SKIPIF-- + +--FILE-- +name = 'Mr. X'; + $this->bars = array(); + } + + function getdrunk($where) + { + $this->bars[] = new bar($where); + } + + function getName() + { + return $this->name; + } +} + +class bar extends man +{ + public $name; + + function bar($w) + { + $this->name = $w; + } + + function getName() + { + return $this->name; + } + + function whosdrunk() + { + $who = get_parent_class($this); + if($who == NULL) + { + return 'nobody'; + } + return eval("return ".$who.'::getName();'); + } +} + +$x = new man; +$x->getdrunk('The old Tavern'); +var_dump($x->bars[0]->whosdrunk()); +?> +--EXPECT-- +string(14) "The old Tavern" diff --git a/tests/lang/bug22231.phpt b/tests/lang/bug22231.phpt new file mode 100644 index 0000000..ede6a37 --- /dev/null +++ b/tests/lang/bug22231.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #22231 (segfault when returning a global variable by reference) +--INI-- +error_reporting=E_ALL | E_DEPRECATED +--FILE-- +fubar); +unset($bar); +$bar = &foo(); +var_dump($bar->fubar); + +$foo = &foo(); +var_dump($foo); +var_dump($foo->fubar); +unset($foo); +$foo = &foo(); +var_dump($foo->fubar); +?> +--EXPECTF-- +Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d +object(foo)#%d (1) { + ["fubar"]=> + string(5) "fubar" +} +string(5) "fubar" +string(5) "fubar" +object(foo)#%d (1) { + ["fubar"]=> + string(5) "fubar" +} +string(5) "fubar" +string(5) "fubar" diff --git a/tests/lang/bug22510.phpt b/tests/lang/bug22510.phpt new file mode 100644 index 0000000..fd71714 --- /dev/null +++ b/tests/lang/bug22510.phpt @@ -0,0 +1,126 @@ +--TEST-- +Bug #22510 (segfault among complex references) +--INI-- +error_reporting=E_ALL | E_DEPRECATED +--FILE-- +list; + } + + function &method1() { + print __CLASS__."::".__FUNCTION__."\n"; + return @$this->foo; + } + + function &method2() { + print __CLASS__."::".__FUNCTION__."\n"; + return $this->foo; + } + + function method3() { + print __CLASS__."::".__FUNCTION__."\n"; + return @$this->foo; + } +} + +class bar +{ + function run1() { + print __CLASS__."::".__FUNCTION__."\n"; + $this->instance = new foo(); + $this->instance->method1($this); + $this->instance->method1($this); + } + + function run2() { + print __CLASS__."::".__FUNCTION__."\n"; + $this->instance = new foo(); + $this->instance->method2($this); + $this->instance->method2($this); + } + + function run3() { + print __CLASS__."::".__FUNCTION__."\n"; + $this->instance = new foo(); + $this->instance->method3($this); + $this->instance->method3($this); + } +} + +function ouch(&$bar) { + print __FUNCTION__."\n"; + @$a = $a; + $bar->run1(); +} + +function ok1(&$bar) { + print __FUNCTION__."\n"; + $bar->run1(); +} + +function ok2(&$bar) { + print __FUNCTION__."\n"; + @$a = $a; + $bar->run2(); +} + +function ok3(&$bar) { + print __FUNCTION__."\n"; + @$a = $a; + $bar->run3(); +} + +$bar = &new bar(); +ok1($bar); +$bar->instance->finalize(); +print "done!\n"; +ok2($bar); +$bar->instance->finalize(); +print "done!\n"; +ok3($bar); +$bar->instance->finalize(); +print "done!\n"; +ouch($bar); +$bar->instance->finalize(); +print "I'm alive!\n"; +?> +--EXPECTF-- +Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d +ok1 +bar::run1 +foo::method1 + +Notice: Only variable references should be returned by reference in %s on line %d +foo::method1 + +Notice: Only variable references should be returned by reference in %s on line %d +foo::finalize +done! +ok2 +bar::run2 +foo::method2 +foo::method2 +foo::finalize +done! +ok3 +bar::run3 +foo::method3 +foo::method3 +foo::finalize +done! +ouch +bar::run1 +foo::method1 + +Notice: Only variable references should be returned by reference in %s on line %d +foo::method1 + +Notice: Only variable references should be returned by reference in %s on line %d +foo::finalize +I'm alive! diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt new file mode 100644 index 0000000..2705841 --- /dev/null +++ b/tests/lang/bug22592.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #22592 (cascading assignments to strings with curly braces broken) +--FILE-- + +--EXPECT-- +string(5) "* *-*" +string(7) "* *-* *" +string(7) "*4*-* *" +string(7) "*4*s* *" +string(8) "*4*s* *0" +string(8) "*-*-* *0" +string(8) "*-*s*s*0" +string(8) "4-4s4s*0" +string(9) "4-4s4s505" +string(9) "454s4s505" +string(1) "-" +string(1) "s" +string(1) "4" +string(1) "5" +string(1) "5" +[Illegal string offset: -1] diff --git a/tests/lang/bug22690.phpt b/tests/lang/bug22690.phpt new file mode 100644 index 0000000..6aed5be --- /dev/null +++ b/tests/lang/bug22690.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #22690 (ob_start() is broken with create_function() callbacks) +--FILE-- + +bar +--EXPECT-- +BAR +BAR diff --git a/tests/lang/bug23279.phpt b/tests/lang/bug23279.phpt new file mode 100644 index 0000000..78d7850 --- /dev/null +++ b/tests/lang/bug23279.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #23279 (exception handler stops after first function call) +--FILE-- + +--EXPECT-- +Goodbye Cruel World diff --git a/tests/lang/bug23384.phpt b/tests/lang/bug23384.phpt new file mode 100644 index 0000000..382bdfe --- /dev/null +++ b/tests/lang/bug23384.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #23384 (use of class constants in statics) +--INI-- +error_reporting=4095 +--FILE-- + 'ten'); + static $arr = array(Foo::HUN => 'ten'); + + print_r($arr); + print_r($arr2); + print_r($x); + } +} + +Foo::test(); +echo Foo::HUN."\n"; +?> +--EXPECTF-- +Strict Standards: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d +Array +( + [100] => ten +) +Array +( + [10] => ten +) +100100 diff --git a/tests/lang/bug23489.phpt b/tests/lang/bug23489.phpt new file mode 100644 index 0000000..645bb1b --- /dev/null +++ b/tests/lang/bug23489.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #23489 (ob_start() is broken with method callbacks) +--FILE-- + +failure +--EXPECT-- +success diff --git a/tests/lang/bug23524.phpt b/tests/lang/bug23524.phpt new file mode 100644 index 0000000..512c714 --- /dev/null +++ b/tests/lang/bug23524.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #23524 (Improper handling of constants in array indices) +--FILE-- +THE_CONST)) { + print_r($a); + } + f(); + f(); + f(); + echo "Done"; +?> +--EXPECT-- +Begin +Array +( + [123] => 123 +) +Array +( + [123] => 123 +) +Array +( + [123] => 123 +) +Done diff --git a/tests/lang/bug23584.phpt b/tests/lang/bug23584.phpt new file mode 100644 index 0000000..417cfb0 --- /dev/null +++ b/tests/lang/bug23584.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #23584 (error line numbers off by one when using #!php) +--FILE-- +#!php + +--EXPECTREGEX-- +Notice: Undefined variable:.*foo in .* on line 6 diff --git a/tests/lang/bug23624.phpt b/tests/lang/bug23624.phpt new file mode 100644 index 0000000..4ddb82e --- /dev/null +++ b/tests/lang/bug23624.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #23624 (foreach leaves current array key as null) +--FILE-- + $value); + var_dump(current($arr)); +?> +--EXPECT-- +string(3) "one" +bool(false) diff --git a/tests/lang/bug23922.phpt b/tests/lang/bug23922.phpt new file mode 100644 index 0000000..1fc6e54 --- /dev/null +++ b/tests/lang/bug23922.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #23922 (scope doesn't properly propagate into internal functions) +--FILE-- +foo == 1'); } + + function as_expr() + { assert($this->foo == 1); } + } + + $foo = new foo(); + $foo->as_expr(); + $foo->as_string(); +?> +--EXPECT-- diff --git a/tests/lang/bug24054.phpt b/tests/lang/bug24054.phpt new file mode 100644 index 0000000..fc51c83 --- /dev/null +++ b/tests/lang/bug24054.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #24054 (Assignment operator *= broken) +--FILE-- + 1, 'b' => 2, 'c' => 3); + +foreach($arr as $k=>$v) { + global $$k; // comment this out and it works in PHP 5 too.. + + echo "($k => $v)\n"; + + $$k = $v; +} +?> +--EXPECT-- +(a => 1) +(b => 2) +(c => 3) diff --git a/tests/lang/bug24403.phpt b/tests/lang/bug24403.phpt new file mode 100644 index 0000000..fe99257 --- /dev/null +++ b/tests/lang/bug24403.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #24403 (scope doesn't properly propagate into internal functions) +--FILE-- +a) ? '\'.\$p[\'\\1\'].\'' : +'\'.\$r[\'\\1\'].\'')", + "{a} b {c}"); + } +} +new a(); +?> +--EXPECT-- diff --git a/tests/lang/bug24436.phpt b/tests/lang/bug24436.phpt new file mode 100644 index 0000000..b0cfbe0 --- /dev/null +++ b/tests/lang/bug24436.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #24436 (isset() and empty() produce errors with non-existent variables in objects) +--FILE-- +test[0][0])) { print "test1";} + if (!isset($this->test[0][0])) { print "test2";} + } +} + +$test1 = new test(); +?> +--EXPECT-- +test1test2 diff --git a/tests/lang/bug24499.phpt b/tests/lang/bug24499.phpt new file mode 100644 index 0000000..6ce56db --- /dev/null +++ b/tests/lang/bug24499.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #24499 (bogus handling of a public property as a private one) +--FILE-- +id = "bar"; + } +} + +$id = new Id(); +@$obj->foo = "bar"; +$id->tester($obj); +print_r($obj); +?> +--EXPECT-- +stdClass Object +( + [foo] => bar + [id] => bar +) diff --git a/tests/lang/bug24573.phpt b/tests/lang/bug24573.phpt new file mode 100644 index 0000000..e087d1f --- /dev/null +++ b/tests/lang/bug24573.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #24573 (debug_backtrace() crashes if $this is set to null) +--FILE-- +Bar(); + +echo "OK\n"; + +?> +--EXPECTF-- + +Fatal error: Cannot re-assign $this in %s on line %d \ No newline at end of file diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt new file mode 100644 index 0000000..919b38e --- /dev/null +++ b/tests/lang/bug24640.phpt @@ -0,0 +1,129 @@ +--TEST-- +Bug #24640 (var_export and var_dump can't output large float) +--INI-- +precision=12 +--FILE-- + +===DONE=== + +--EXPECTF-- +1.7E+300 +float(1.7E+300) +1.7E+300 +1.7E+300 +------ +1.7E-300 +float(1.7E-300) +1.7E-300 +1.7E-300 +------ +1.7E+79 +float(1.7E+79) +1.7E+79 +1.7E+79 +------ +1.7E-79 +float(1.7E-79) +1.7E-79 +1.7E-79 +------ +1.7E+80 +float(1.7E+80) +1.7E+80 +1.7E+80 +------ +1.7E-80 +float(1.7E-80) +1.7E-80 +1.7E-80 +------ +1.7E+81 +float(1.7E+81) +1.7E+81 +1.7E+81 +------ +1.7E-81 +float(1.7E-81) +1.7E-81 +1.7E-81 +------ +I%s +float(I%s) +I%s +I%s +------ +1.69998107421E-319 +float(1.69998107421E-319) +1.69998107421E-319 +1.69998107421E-319 +------ +I%s +float(I%s) +I%s +I%s +------ +1.70007988734E-320 +float(1.70007988734E-320) +1.70007988734E-320 +1.70007988734E-320 +------ +I%s +float(I%s) +I%s +I%s +------ +1.69958582169E-321 +float(1.69958582169E-321) +1.69958582169E-321 +1.69958582169E-321 +------ +I%s +float(I%s) +I%s +I%s +------ +0 +float(0) +0 +0 +------ +I%s +float(I%s) +I%s +I%s +------ +0 +float(0) +0 +0 +------ +===DONE=== diff --git a/tests/lang/bug24652.phpt b/tests/lang/bug24652.phpt new file mode 100644 index 0000000..3bcea0e --- /dev/null +++ b/tests/lang/bug24652.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #24652 (broken array_flip()) +--FILE-- + 0); + var_dump($f); + var_dump(array_key_exists(7, $f)); + var_dump(array_key_exists('7', $f)); + + print "----------\n"; + /* This doesn't */ + $f = array_flip(array('7')); + var_dump($f); + var_dump(array_key_exists(7, $f)); + var_dump(array_key_exists('7', $f)); +?> +--EXPECT-- +array(1) { + [7]=> + int(0) +} +bool(true) +bool(true) +---------- +array(1) { + [7]=> + int(0) +} +bool(true) +bool(true) diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt new file mode 100644 index 0000000..944fe44 --- /dev/null +++ b/tests/lang/bug24658.phpt @@ -0,0 +1,56 @@ +--TEST-- +Bug #24658 (combo of typehint / reference causes crash) +--FILE-- + +--EXPECTF-- +object(foo)#%d (0) { +} +object(foo)#%d (0) { +} +object(foo)#%d (0) { +} +object(foo)#%d (0) { +} +===no_typehint=== +object(foo)#%d (0) { +} +int(1) +int(2) +===no_typehint_ref=== +object(foo)#%d (0) { +} +int(1) +int(2) +===typehint=== +object(foo)#%d (0) { +} + +Catchable fatal error: Argument 1 passed to typehint() must be an instance of foo, integer given in %s on line %d diff --git a/tests/lang/bug24783.phpt b/tests/lang/bug24783.phpt new file mode 100644 index 0000000..8c8cd6e --- /dev/null +++ b/tests/lang/bug24783.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #24783 ($key not binary safe in "foreach($arr as $key => $val)") +--FILE-- + "foo\0bar"); + foreach ($arr as $key => $val) { + echo strlen($key), ': '; + echo urlencode($key), ' => ', urlencode($val), "\n"; + } +?> +--EXPECT-- +7: foo%00bar => foo%00bar diff --git a/tests/lang/bug24908.phpt b/tests/lang/bug24908.phpt new file mode 100644 index 0000000..30056ab --- /dev/null +++ b/tests/lang/bug24908.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #24908 (super-globals can not be used in __destruct()) +--INI-- +variables_order=GPS +--FILE-- + +--EXPECT-- +OK diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt new file mode 100644 index 0000000..3d2cc70 --- /dev/null +++ b/tests/lang/bug24926.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #24926 (lambda function (create_function()) cannot be stored in a class property) +--FILE-- +functions['test'] = $function; + print($this->functions['test']()); // werkt al niet meer + + } +} + +$a = new foo (); + +?> +--EXPECT-- +FOO +FOO diff --git a/tests/lang/bug24951.phpt b/tests/lang/bug24951.phpt new file mode 100644 index 0000000..aa48ab2 --- /dev/null +++ b/tests/lang/bug24951.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #24951 (ob_flush() destroys output handler) +--FILE-- + +--EXPECT-- +[Hello from t1 1 Hello from t1 2 ] + +[Hello from t2 1 Hello from t2 2 ] + +Hello from t3 2 ] diff --git a/tests/lang/bug25145.phpt b/tests/lang/bug25145.phpt new file mode 100644 index 0000000..9c53387 --- /dev/null +++ b/tests/lang/bug25145.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #25145 (SEGV on recpt of form input with name like "123[]") +--GET-- +123[]=SEGV +--FILE-- + +--EXPECT-- +array(1) { + [123]=> + array(1) { + [0]=> + string(4) "SEGV" + } +} +Done diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt new file mode 100644 index 0000000..b54f467 --- /dev/null +++ b/tests/lang/bug25547.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #25547 (error_handler and array index with function call) +--FILE-- + +--EXPECT-- +handler(Undefined index: foo) +Array +( + [foo] => 1 +) +Done diff --git a/tests/lang/bug25652.phpt b/tests/lang/bug25652.phpt new file mode 100644 index 0000000..09cfc18 --- /dev/null +++ b/tests/lang/bug25652.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #25652 (Calling Global functions dynamically fails from Class scope) +--FILE-- +arr[0]('testvalue'); + } + } + + $a = new foo (); + $a->bar (); + +?> +--EXPECT-- +testfunc testvalue diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt new file mode 100644 index 0000000..bb030c9 --- /dev/null +++ b/tests/lang/bug25922.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #25922 (SEGV in error_handler when context is destroyed) +--INI-- +error_reporting=2047 +--FILE-- + +--EXPECT-- +Undefined variable: data +Undefined index here: '' diff --git a/tests/lang/bug26182.phpt b/tests/lang/bug26182.phpt new file mode 100644 index 0000000..7417293 --- /dev/null +++ b/tests/lang/bug26182.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #26182 (Object properties created redundantly) +--INI-- +error_reporting=4095 +--FILE-- +x)) { + //just for demo + } + } +} + +$t = new A (); + +print_r($t); + +?> +--EXPECT-- +A Object +( +) diff --git a/tests/lang/bug26696.phpt b/tests/lang/bug26696.phpt new file mode 100644 index 0000000..dae182d --- /dev/null +++ b/tests/lang/bug26696.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #26696 (string index in a switch() crashes with multiple matches) +--FILE-- + +--EXPECT-- +OK +OK diff --git a/tests/lang/bug26866.phpt b/tests/lang/bug26866.phpt new file mode 100644 index 0000000..abb99c3 --- /dev/null +++ b/tests/lang/bug26866.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #26866 (segfault when exception raised in __get) +--FILE-- +bar->get_name(); +} +catch (Exception $E) { + echo "Exception raised!\n"; +} +?> +--EXPECT-- +Exception raised! diff --git a/tests/lang/bug26869.phpt b/tests/lang/bug26869.phpt new file mode 100644 index 0000000..77dd259 --- /dev/null +++ b/tests/lang/bug26869.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #26869 (constant as the key of static array) +--FILE-- + 1); + var_dump($a); + var_dump(isset($a[A])); +?> +--EXPECT-- +array(1) { + [1]=> + int(1) +} +bool(true) diff --git a/tests/lang/bug27354.phpt b/tests/lang/bug27354.phpt new file mode 100644 index 0000000..e10ad9c --- /dev/null +++ b/tests/lang/bug27354.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #27354 (Modulus operator crashes PHP) +--FILE-- + +--EXPECTF-- +int(%i) +int(%i) +int(%i) +int(%i) diff --git a/tests/lang/bug27439.phpt b/tests/lang/bug27439.phpt new file mode 100644 index 0000000..4bcadb7 --- /dev/null +++ b/tests/lang/bug27439.phpt @@ -0,0 +1,76 @@ +--TEST-- +Bug #27439 (foreach() with $this segfaults) +--FILE-- +object = new test_props; + } + + public function getArray() { + return $this->array; + } + + public function getString() { + return $this->string; + } + + public function case1() { + foreach ($this->array as $foo) { + echo $foo; + } + } + + public function case2() { + foreach ($this->foobar as $foo); + } + + public function case3() { + foreach ($this->string as $foo); + } + + public function case4() { + foreach ($this->getArray() as $foo); + } + + public function case5() { + foreach ($this->getString() as $foo); + } + + public function case6() { + foreach ($this->object as $foo) { + echo $foo; + } + } +} +$test = new test(); +$test->case1(); +$test->case2(); +$test->case3(); +$test->case4(); +$test->case5(); +$test->case6(); +echo "\n"; +echo "===DONE==="; +?> +--EXPECTF-- +123 +Notice: Undefined property: test::$foobar in %s on line %d + +Warning: Invalid argument supplied for foreach() in %s on line %d + +Warning: Invalid argument supplied for foreach() in %s on line %d + +Warning: Invalid argument supplied for foreach() in %s on line %d +123 +===DONE=== diff --git a/tests/lang/bug27443.phpt b/tests/lang/bug27443.phpt new file mode 100644 index 0000000..4097943 --- /dev/null +++ b/tests/lang/bug27443.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #27443 (defined() returns wrong type) +--FILE-- + +--EXPECT-- +boolean diff --git a/tests/lang/bug27535.phpt b/tests/lang/bug27535.phpt new file mode 100644 index 0000000..a6ceae7 --- /dev/null +++ b/tests/lang/bug27535.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #27535 (Objects pointing to each other cause Apache to crash) +--FILE-- +storage = new Class1(); + + $this->storage->_Class2_obj = $this; + } +} + +$foo = new Class2(); + +?> +Alive! +--EXPECT-- +Alive! diff --git a/tests/lang/bug28213.phpt b/tests/lang/bug28213.phpt new file mode 100644 index 0000000..3677d4c --- /dev/null +++ b/tests/lang/bug28213.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #28213 (crash in debug_print_backtrace in static methods) +--FILE-- + +--EXPECTREGEX-- +.*#1\s*include.* diff --git a/tests/lang/bug28800.phpt b/tests/lang/bug28800.phpt new file mode 100644 index 0000000..f81ad7f --- /dev/null +++ b/tests/lang/bug28800.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #28800 (Incorrect string to number conversion for strings starting with 'inf') +--FILE-- + +--EXPECT-- +0 +0 +0 +0 +0 +0 + diff --git a/tests/lang/bug29566.phpt b/tests/lang/bug29566.phpt new file mode 100644 index 0000000..16aec8f --- /dev/null +++ b/tests/lang/bug29566.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #29566 (foreach/string handling strangeness) +--FILE-- + +===DONE=== +--EXPECTF-- +Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d + +Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d +===DONE=== diff --git a/tests/lang/bug29893.phpt b/tests/lang/bug29893.phpt new file mode 100644 index 0000000..d320de0 --- /dev/null +++ b/tests/lang/bug29893.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #29893 (segfault when using array as index) +--FILE-- + +===DONE=== +--EXPECTF-- +Warning: Cannot use a scalar value as an array in %sbug29893.php on line %d +===DONE=== diff --git a/tests/lang/bug29944.phpt b/tests/lang/bug29944.phpt new file mode 100644 index 0000000..7882936 --- /dev/null +++ b/tests/lang/bug29944.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #29944 (function defined in switch crashes PHP) +--FILE-- + + +===DONE=== +--EXPECT-- +1 +===DONE=== diff --git a/tests/lang/bug30578.phpt b/tests/lang/bug30578.phpt new file mode 100644 index 0000000..d8a8d2e --- /dev/null +++ b/tests/lang/bug30578.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #30578 (Output buffers flushed before calling __desctruct functions) +--FILE-- + +--EXPECT-- +This should be displayed first. +Buffered data: This should be displayed last. diff --git a/tests/lang/bug30638.phpt b/tests/lang/bug30638.phpt new file mode 100644 index 0000000..945a228 --- /dev/null +++ b/tests/lang/bug30638.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +decimal_point: , +thousands_sep: . diff --git a/tests/lang/bug30726.phpt b/tests/lang/bug30726.phpt new file mode 100644 index 0000000..79aeff7 --- /dev/null +++ b/tests/lang/bug30726.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #30726 (-.1 like numbers are not being handled correctly) +--FILE-- + +--EXPECT-- +1 diff --git a/tests/lang/bug30862.phpt b/tests/lang/bug30862.phpt new file mode 100644 index 0000000..12c95d5 --- /dev/null +++ b/tests/lang/bug30862.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #30862 (Static array with boolean indexes) +--FILE-- +"false", true=>"true"); +} +print_r(T::$a); +?> +---------- +"false", Y=>"true"); +} +print_r(T2::$a); +?> +--EXPECT-- +Array +( + [0] => false + [1] => true +) +---------- +Array +( + [0] => false + [1] => true +) diff --git a/tests/lang/bug32828.phpt b/tests/lang/bug32828.phpt new file mode 100644 index 0000000..ad59646 --- /dev/null +++ b/tests/lang/bug32828.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #32828 (Throwing exception in output_callback function with ob_start and ob_end_clean leads to segfault) +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught exception 'Exception' in %s:%d +Stack trace: +#0 [internal function]: output_handler('', %d) +#1 %s(%d): ob_end_clean() +#2 {main} + thrown in %s on line %d diff --git a/tests/lang/bug32924.phpt b/tests/lang/bug32924.phpt new file mode 100644 index 0000000..d72b0ea --- /dev/null +++ b/tests/lang/bug32924.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #32924 (prepend does not add file to included files) +--INI-- +include_path={PWD} +auto_prepend_file=inc.inc +--FILE-- + +END +--EXPECT-- +Included! +END diff --git a/tests/lang/bug35176.phpt b/tests/lang/bug35176.phpt new file mode 100644 index 0000000..2928f7e --- /dev/null +++ b/tests/lang/bug35176.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #35176 (include()/require()/*_once() produce wrong error messages about main()) +--INI-- +html_errors=1 +docref_root="/" +error_reporting=4095 +--FILE-- + +--EXPECTF-- +
+Warning: require_once(nonexisiting.php) [function.require-once.html]: failed to open stream: No such file or directory in %sbug35176.php on line 2
+
+Fatal error: require_once() [function.require.html]: Failed opening required 'nonexisiting.php' (%s) in %sbug35176.php on line 2
diff --git a/tests/lang/bug35382.phpt b/tests/lang/bug35382.phpt new file mode 100644 index 0000000..69190d4 --- /dev/null +++ b/tests/lang/bug35382.phpt @@ -0,0 +1,9 @@ +--TEST-- +Bug #35382 (Comment in end of file produces fatal error) +--FILEEOF-- + diff --git a/tests/lang/bug38579.phpt b/tests/lang/bug38579.phpt new file mode 100644 index 0000000..445296c --- /dev/null +++ b/tests/lang/bug38579.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #38579 (include_once() may include the same file twice) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +ok diff --git a/tests/lang/bug43958.phpt b/tests/lang/bug43958.phpt new file mode 100644 index 0000000..bc88bcd --- /dev/null +++ b/tests/lang/bug43958.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #43958 (class name added into the error message) +--FILE-- + +# +# +--EXPECT-- +#1##1 diff --git a/tests/lang/bug44827.phpt b/tests/lang/bug44827.phpt new file mode 100644 index 0000000..031045b --- /dev/null +++ b/tests/lang/bug44827.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #44827 (Class error when trying to access :: as constant) +--CREDITS-- +Sebastian Schürmann +sebs@php.net +Testfest Munich 2009 +--FILE-- + +--EXPECTF-- +Warning: Class constants cannot be defined or redefined in %s on line %d + +Warning: constant(): Couldn't find constant :: in %s on line %d +NULL + diff --git a/tests/lang/bug45392.phpt b/tests/lang/bug45392.phpt new file mode 100644 index 0000000..78876c7 --- /dev/null +++ b/tests/lang/bug45392.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #45392 (ob_start()/ob_end_clean() and memory_limit) +--INI-- +display_errors=stderr +--SKIPIF-- + +--EXPECTF-- +2 +Fatal error: Allowed memory size of %d bytes exhausted%s diff --git a/tests/lang/bug55754.phpt b/tests/lang/bug55754.phpt new file mode 100644 index 0000000..c58ec91 --- /dev/null +++ b/tests/lang/bug55754.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #55754 (Only variables should be passed by reference for ZEND_SEND_PREFER_REF params) +--FILE-- + "a")); +current(array(0 => "a")); +current($arr); + +echo "DONE"; + +?> +--EXPECT-- +DONE diff --git a/tests/lang/bug7515.phpt b/tests/lang/bug7515.phpt new file mode 100644 index 0000000..ea58061 --- /dev/null +++ b/tests/lang/bug7515.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #7515 (weird & invisible referencing of objects) +--SKIPIF-- + +--INI-- +error_reporting=2039 +--FILE-- +root=new obj(); + +ob_start(); +var_dump($o); +$x=ob_get_contents(); +ob_end_clean(); + +$o->root->method(); + +ob_start(); +var_dump($o); +$y=ob_get_contents(); +ob_end_clean(); +if ($x == $y) { + print "success"; +} else { + print "failure +x=$x +y=$y +"; +} +?> +--EXPECTF-- +Warning: Creating default object from empty value in %s on line %d +success diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt new file mode 100644 index 0000000..f6bbdd9 --- /dev/null +++ b/tests/lang/catchable_error_001.phpt @@ -0,0 +1,22 @@ +--TEST-- +Catchable fatal error [1] +--FILE-- + +--EXPECTF-- +Catchable fatal error: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt new file mode 100644 index 0000000..c1762b2 --- /dev/null +++ b/tests/lang/catchable_error_002.phpt @@ -0,0 +1,37 @@ +--TEST-- +Catchable fatal error [2] +--FILE-- + +--EXPECTF-- +array(5) { + [0]=> + int(4096) + [1]=> + string(%d) "Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d and defined" + [2]=> + string(%d) "%scatchable_error_002.php" + [3]=> + int(5) + [4]=> + array(0) { + } +} +ALIVE! diff --git a/tests/lang/comments.phpt b/tests/lang/comments.phpt new file mode 100644 index 0000000..ca8b1d2 --- /dev/null +++ b/tests/lang/comments.phpt @@ -0,0 +1,24 @@ +--TEST-- +#-style comments +--FILE-- +#teste +#teste2 + +--EXPECT-- +#teste +#teste2 +#ola +uhm # ah +e este, # hein? diff --git a/tests/lang/comments2.phpt b/tests/lang/comments2.phpt new file mode 100644 index 0000000..8d727d9 --- /dev/null +++ b/tests/lang/comments2.phpt @@ -0,0 +1,9 @@ +--TEST-- +#-style comments (part 2) +--FILEEOF-- + +# +===DONE=== +--EXPECT-- +Simple test for standard compare object handler + +-- The following compare should return TRUE -- +bool(true) + +-- All the following compares should return FALSE -- +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +===DONE=== \ No newline at end of file diff --git a/tests/lang/compare_objects_basic2.phpt b/tests/lang/compare_objects_basic2.phpt new file mode 100644 index 0000000..7e4786c --- /dev/null +++ b/tests/lang/compare_objects_basic2.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test object compare when object handler different +--FILE-- + + +===DONE=== +--EXPECTF-- +Simple test comparing two objects with different compare callback handler +bool(false) +===DONE=== diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt new file mode 100644 index 0000000..bb13534 --- /dev/null +++ b/tests/lang/each_binary_safety.phpt @@ -0,0 +1,13 @@ +--TEST-- +Binary safety of each() for both keys and values +--FILE-- + "foo\0bar"); +while (list($key, $val) = each($arr)) { + echo strlen($key), ': '; + echo urlencode($key), ' => ', urlencode($val), "\n"; +} +?> +--EXPECT-- +7: foo%00bar => foo%00bar diff --git a/tests/lang/empty_variation.phpt b/tests/lang/empty_variation.phpt new file mode 100644 index 0000000..8e940da --- /dev/null +++ b/tests/lang/empty_variation.phpt @@ -0,0 +1,14 @@ +--TEST-- +empty() on array elements +--FILE-- +'0'); +var_dump(empty($a['empty'])); +var_dump(empty($a[0])); +$b='0'; +var_dump(empty($b)); +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) diff --git a/tests/lang/engine_assignExecutionOrder_001.phpt b/tests/lang/engine_assignExecutionOrder_001.phpt new file mode 100644 index 0000000..1b85cb7 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_001.phpt @@ -0,0 +1,152 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- +${f()} = g(); +var_dump($oa); + +echo "\n\nOrder with nested object property assignment:\n"; +$ob = new stdClass; +$ob->o1 = new stdClass; +$ob->o1->o2 = new stdClass; +$ob->o1->o2->${f()} = g(); +var_dump($ob); + +echo "\n\nOrder with dim_list property assignment:\n"; +$oc = new stdClass; +$oc->a[${f()}] = g(); +var_dump($oc); + + +class C { + public static $name = "original"; + public static $a = array(); + public static $string = "hello"; +} +echo "\n\nOrder with static property assignment:\n"; +C::${f()} = g(); +var_dump(C::$name); + +echo "\n\nOrder with static array property assignment:\n"; +C::$a[f()] = g(); +var_dump(C::$a); + +echo "\n\nOrder with indexed string assignment:\n"; +$string = "hello"; +function getOffset() { + echo "in getOffset()\n"; + return 0; +} +function newChar() { + echo "in newChar()\n"; + return 'j'; +} +$string[getOffset()] = newChar(); +var_dump($string); + +echo "\n\nOrder with static string property assignment:\n"; +C::$string[getOffset()] = newChar(); +var_dump(C::$string); + +?> +--EXPECTF-- + + +Order with local assignment: +in f() +in g() +%string|unicode%(14) "assigned value" + + +Order with array assignment: +in f() +in g() +array(1) { + [%u|b%"name"]=> + %string|unicode%(14) "assigned value" +} + + +Order with object property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" +} + + +Order with nested object property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"o1"]=> + object(stdClass)#%d (1) { + [%u|b%"o2"]=> + object(stdClass)#%d (1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" + } + } +} + + +Order with dim_list property assignment: +in f() +in g() +object(stdClass)#%d (1) { + [%u|b%"a"]=> + array(1) { + [%u|b%"assigned value"]=> + %string|unicode%(14) "assigned value" + } +} + + +Order with static property assignment: +in f() +in g() +%string|unicode%(14) "assigned value" + + +Order with static array property assignment: +in f() +in g() +array(1) { + [%u|b%"name"]=> + %string|unicode%(14) "assigned value" +} + + +Order with indexed string assignment: +in getOffset() +in newChar() +%string|unicode%(5) "jello" + + +Order with static string property assignment: +in getOffset() +in newChar() +%string|unicode%(5) "jello" diff --git a/tests/lang/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt new file mode 100644 index 0000000..ba88150 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_002.phpt @@ -0,0 +1,135 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- + +--EXPECTF-- +A=hello B=bye + +Warning: Cannot use a scalar value as an array in %s on line %d +array(2) { + [0]=> + int(10) + [1]=> + int(10) +} +array(2) { + [0]=> + int(30) + [1]=> + int(30) +} +array(3) { + [0]=> + int(1000) + [1]=> + int(2000) + [2]=> + int(3000) +} +L=100 M=200 N=300 +O= and P= +10 20 40 50 60 70 80 + +Notice: Undefined offset: 1 in %s on line %d + +Notice: Undefined offset: 0 in %s on line %d +Y=,Z= + +Notice: Undefined offset: 1 in %s on line %d +AA=10 +CC=10 DD=30 +Array +( + [0] => array created in f() + [array entry created after f()] => Array + ( + [1] => hello + ) + +) diff --git a/tests/lang/engine_assignExecutionOrder_003.phpt b/tests/lang/engine_assignExecutionOrder_003.phpt new file mode 100644 index 0000000..ae3ae78 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_003.phpt @@ -0,0 +1,96 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- + +--EXPECT-- +Good call +Good call +Expect 15 and get...15 +array(2) { + [0]=> + array(1) { + [0]=> + int(10) + } + [1]=> + int(3) +} \ No newline at end of file diff --git a/tests/lang/engine_assignExecutionOrder_004.phpt b/tests/lang/engine_assignExecutionOrder_004.phpt new file mode 100644 index 0000000..86bc87f --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_004.phpt @@ -0,0 +1,52 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- + +--EXPECT-- +i1 +i2 +i3 +i4 +array(6) { + [0]=> + int(10) + [1]=> + int(11) + [2]=> + int(0) + [3]=> + int(30) + [4]=> + int(40) + [5]=> + int(3) +} diff --git a/tests/lang/engine_assignExecutionOrder_005.phpt b/tests/lang/engine_assignExecutionOrder_005.phpt new file mode 100644 index 0000000..6ec03f1 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_005.phpt @@ -0,0 +1,74 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- + +--EXPECT-- +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} diff --git a/tests/lang/engine_assignExecutionOrder_006.phpt b/tests/lang/engine_assignExecutionOrder_006.phpt new file mode 100644 index 0000000..faa34c3 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_006.phpt @@ -0,0 +1,138 @@ +--TEST-- +Evaluation order during assignments. +--FILE-- + +--EXPECT-- +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +i1 +i2 +i3 +i4 +i5 +i6 +array(1) { + [0]=> + array(1) { + [0]=> + int(-2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} +array(1) { + [0]=> + array(1) { + [0]=> + int(2) + } +} diff --git a/tests/lang/engine_assignExecutionOrder_007.phpt b/tests/lang/engine_assignExecutionOrder_007.phpt new file mode 100644 index 0000000..56b729e --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_007.phpt @@ -0,0 +1,46 @@ +--TEST-- +Check key execution order with &new. +--FILE-- +a =& new $a[$i=2][++$i]; +$o->a->b =& new $a[$i=2][++$i]; +print_r($o); +?> +--EXPECTF-- +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 3 + +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 7 + +Deprecated: Assigning the return value of new by reference is deprecated in %s.php on line 8 +Array +( + [2] => Array + ( + [3] => stdClass + ) + + [0] => Array + ( + [1] => stdClass Object + ( + ) + + ) + +) +stdClass Object +( + [a] => stdClass Object + ( + [b] => stdClass Object + ( + ) + + ) + +) diff --git a/tests/lang/engine_assignExecutionOrder_008.phpt b/tests/lang/engine_assignExecutionOrder_008.phpt new file mode 100644 index 0000000..1333bcd --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_008.phpt @@ -0,0 +1,81 @@ +--TEST-- +Ensure by value assignments leave temporaries on the stack, for all sorts of assignees. +--FILE-- +p=f(): '; +echo $a[$i->p=f()][++$i->p]; +unset($i); + +echo "\n" . '$i->p->q=f(): '; +echo $a[$i->p->q=f()][++$i->p->q]; +unset($i); + +echo "\n" . '$i->p[0]=f(): '; +echo $a[$i->p[0]=f()][++$i->p[0]]; +unset($i); + +echo "\n" . '$i->p[0]->p=f(): '; +echo $a[$i->p[0]->p=f()][++$i->p[0]->p]; +unset($i); + +Class C { + static $p; +} + +echo "\n" . 'C::$p=f(): '; +echo $a[C::$p=f()][++C::$p]; + +echo "\n" . 'C::$p[0]=f(): '; +C::$p = array(); +echo $a[C::$p[0]=f()][++C::$p[0]]; + +echo "\n" . 'C::$p->q=f(): '; +C::$p = new stdclass; +echo $a[C::$p->q=f()][++C::$p->q]; +?> +--EXPECTF-- +$i=f(): good +$$x=f(): good +${'i'}=f(): good +$i[0]=f(): good +$i[0][0]=f(): good +$i->p=f(): +Warning: Creating default object from empty value in %s on line %d +good +$i->p->q=f(): +Warning: Creating default object from empty value in %s on line %d +good +$i->p[0]=f(): good +$i->p[0]->p=f(): +Warning: Creating default object from empty value in %s on line %d +good +C::$p=f(): good +C::$p[0]=f(): good +C::$p->q=f(): good diff --git a/tests/lang/engine_assignExecutionOrder_009.phpt b/tests/lang/engine_assignExecutionOrder_009.phpt new file mode 100644 index 0000000..e1d5b71 --- /dev/null +++ b/tests/lang/engine_assignExecutionOrder_009.phpt @@ -0,0 +1,36 @@ +--TEST-- +Execution ordering with comparison operators. +--FILE-- + f(++$i)); +var_dump(f($i=0) >= f(++$i)); + +echo "\nArray indices:\n"; +$a[1][2] = 0; +$a[3][4] = 1; +$i=0; +var_dump($a[$i=1][++$i] < $a[++$i][++$i]); +var_dump($a[$i=1][++$i] <= $a[++$i][++$i]); +var_dump($a[$i=1][++$i] > $a[++$i][++$i]); +var_dump($a[$i=1][++$i] >= $a[++$i][++$i]); +?> +--EXPECTF-- +Function call args: +f(0) f(1) bool(true) +f(0) f(1) bool(true) +f(0) f(1) bool(false) +f(0) f(1) bool(false) + +Array indices: +bool(true) +bool(true) +bool(false) +bool(false) diff --git a/tests/lang/error_2_exception_001.phpt b/tests/lang/error_2_exception_001.phpt new file mode 100644 index 0000000..61f45d4 --- /dev/null +++ b/tests/lang/error_2_exception_001.phpt @@ -0,0 +1,45 @@ +--TEST-- +ZE2 errors caught as exceptions +--SKIPIF-- + +--FILE-- +errno = $_errno; + $this->errmsg = $_errmsg; + } + + function getErrno() { + return $this->errno; + } + + function getErrmsg() { + return $this->errmsg; + } +} + +function ErrorsToExceptions($errno, $errmsg) { + throw new MyException($errno, $errmsg); +} + +set_error_handler("ErrorsToExceptions"); + +// make sure it isn't catching exceptions that weren't +// thrown... + +try { +} catch (MyException $exception) { + echo "There was an exception: " . $exception->getErrno() . ", '" . $exception->getErrmsg() . "'\n"; +} + +try { + trigger_error("I will become an exception", E_USER_ERROR); +} catch (MyException $exception) { + echo "There was an exception: " . $exception->getErrno() . ", '" . $exception->getErrmsg() . "'\n"; +} + +?> +--EXPECT-- +There was an exception: 256, 'I will become an exception' diff --git a/tests/lang/execution_order.phpt b/tests/lang/execution_order.phpt new file mode 100644 index 0000000..ca3feb3 --- /dev/null +++ b/tests/lang/execution_order.phpt @@ -0,0 +1,198 @@ +--TEST-- +Execution order of variables +--FILE-- +str.($str->str="good"); +echo "3)"; +echo $c; +echo "\r\n"; + +$str->str = "bad"; + +$c = ($str->str="good").$str->str; +echo "4)"; +echo $c; +echo "\r\n"; + +$c = strclass::$statstr.(strclass::$statstr="good"); +echo "5)"; +echo $c; +echo "\r\n"; + +strclass::$statstr = "bad"; + +$c = (strclass::$statstr="good").strclass::$statstr; +echo "6)"; +echo $c; +echo "\r\n"; + + +function foo() { + global $a; + $a = "good"; + return $a; +} + + +$a = "bad"; +echo "7)"; +echo foo() . $a; +echo "\r\n"; + +$a = "bad"; +echo "8)"; +echo $a . foo(); +echo "\r\n"; + +/* other operators */ + +$x = 1; +$z = $x - ($x++); +echo "9)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = ($x++) - $x; +echo "10)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = $x - (++$x); +echo "11)"; +echo $z; +echo "\r\n"; + +$x = 1; +$z = (++$x) - $x; +echo "12)"; +echo $z; +echo "\r\n"; + + +$x = 1; +$y = 3; +$z = $x - ($x=$y); +echo "13)"; +echo $z; +echo "\r\n"; + +$x = 1; +$y = 3; +$z = ($x=$y) - $x; +echo "14)"; +echo $z; +echo "\r\n"; + + +$a = 100; +$b = 200; +echo "15)"; +echo $a + ($a=$b); +echo "\r\n"; + +$a = 100; +$b = 200; +echo "16)"; +echo ($a=$b) + $a; +echo "\r\n"; + + +$a = array(100,200); +$i = 0; + +echo "17)"; +echo $a[$i++] + $a[$i++]; +echo "\r\n"; + +$i = -1; +echo "18)"; +echo $a[++$i] + $a[++$i]; +echo "\r\n"; + +$i = 0; +echo "19)"; +echo $a[$i] + ($a[$i]=400); +echo "\r\n"; + + +$a[0] = 100; +echo "20)"; +echo ($a[$i]=400) + $a[$i]; +echo "\r\n"; + + +class c { + var $val = 10; + static $stat = 20; +} + +echo "21)"; +echo c::$stat + (c::$stat=200); +echo "\r\n"; + +echo "22)"; +echo (c::$stat=300) + c::$stat; +echo "\r\n"; + +$c = new c(); + +echo "23)"; +echo $c->val + ($c->val=200); +echo "\r\n"; + +echo "24)"; +echo ($c->val=300) + $c->val; +echo "\r\n"; + +?> +--EXPECT-- +1)goodgood +2)goodgood +3)badgood +4)goodgood +5)badgood +6)goodgood +7)goodgood +8)goodgood +9)1 +10)-1 +11)0 +12)0 +13)0 +14)0 +15)400 +16)400 +17)300 +18)300 +19)500 +20)800 +21)220 +22)600 +23)210 +24)600 diff --git a/tests/lang/foreachLoop.001.phpt b/tests/lang/foreachLoop.001.phpt new file mode 100644 index 0000000..164cac6 --- /dev/null +++ b/tests/lang/foreachLoop.001.phpt @@ -0,0 +1,64 @@ +--TEST-- +Foreach loop tests - basic loop with just value and key => value. +--FILE-- + $v) { + var_dump($k, $v); +} +//check key and value after the loop. +var_dump($k, $v); + +echo "\n"; +//Dynamic array +foreach (array("d","e","f") as $v) { + var_dump($v); +} +foreach (array("d","e","f") as $k => $v) { + var_dump($k, $v); +} +//check key and value after the loop. +var_dump($k, $v); + +echo "\n"; +//Ensure counter is advanced during loop +$a=array("a","b","c"); +foreach ($a as $v); +var_dump(current($a)); +$a=array("a","b","c"); +foreach ($a as &$v); +var_dump(current($a)); + +?> +--EXPECT-- +string(1) "a" +string(1) "b" +string(1) "c" +int(0) +string(1) "a" +int(1) +string(1) "b" +int(2) +string(1) "c" +int(2) +string(1) "c" + +string(1) "d" +string(1) "e" +string(1) "f" +int(0) +string(1) "d" +int(1) +string(1) "e" +int(2) +string(1) "f" +int(2) +string(1) "f" + +bool(false) +bool(false) \ No newline at end of file diff --git a/tests/lang/foreachLoop.002.phpt b/tests/lang/foreachLoop.002.phpt new file mode 100644 index 0000000..e3000c7 --- /dev/null +++ b/tests/lang/foreachLoop.002.phpt @@ -0,0 +1,173 @@ +--TEST-- +Foreach loop tests - modifying the array during the loop. +--FILE-- +$v) { + $a[$k]="changed.$k"; + var_dump($v); +} +var_dump($a); + +echo "\nModifying the foreach \$value.\n"; +$a = array("original.1","original.2","original.3"); +foreach ($a as $k=>$v) { + $v="changed.$k"; +} +var_dump($a); + + +echo "\nModifying the foreach &\$value.\n"; +$a = array("original.1","original.2","original.3"); +foreach ($a as $k=>&$v) { + $v="changed.$k"; +} +var_dump($a); + +echo "\nPushing elements onto an unreferenced array.\n"; +$a = array("original.1","original.2","original.3"); +$counter=0; +foreach ($a as $v) { + array_push($a, "new.$counter"); + + //avoid infinite loop if test is failing + if ($counter++>10) { + echo "Loop detected\n"; + break; + } +} +var_dump($a); + +echo "\nPushing elements onto an unreferenced array, using &\$value.\n"; +$a = array("original.1","original.2","original.3"); +$counter=0; +foreach ($a as &$v) { + array_push($a, "new.$counter"); + + //avoid infinite loop if test is failing + if ($counter++>10) { + echo "Loop detected\n"; + break; + } +} +var_dump($a); + +echo "\nPopping elements off an unreferenced array.\n"; +$a = array("original.1","original.2","original.3"); +foreach ($a as $v) { + array_pop($a); + var_dump($v); +} +var_dump($a); + +echo "\nPopping elements off an unreferenced array, using &\$value.\n"; +$a = array("original.1","original.2","original.3"); +foreach ($a as &$v) { + array_pop($a); + var_dump($v); +} +var_dump($a); + +?> +--EXPECT-- + +Directly changing array values. +string(10) "original.1" +string(10) "original.2" +string(10) "original.3" +array(3) { + [0]=> + string(9) "changed.0" + [1]=> + string(9) "changed.1" + [2]=> + string(9) "changed.2" +} + +Modifying the foreach $value. +array(3) { + [0]=> + string(10) "original.1" + [1]=> + string(10) "original.2" + [2]=> + string(10) "original.3" +} + +Modifying the foreach &$value. +array(3) { + [0]=> + string(9) "changed.0" + [1]=> + string(9) "changed.1" + [2]=> + &string(9) "changed.2" +} + +Pushing elements onto an unreferenced array. +array(6) { + [0]=> + string(10) "original.1" + [1]=> + string(10) "original.2" + [2]=> + string(10) "original.3" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.2" +} + +Pushing elements onto an unreferenced array, using &$value. +Loop detected +array(15) { + [0]=> + string(10) "original.1" + [1]=> + string(10) "original.2" + [2]=> + string(10) "original.3" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.2" + [6]=> + string(5) "new.3" + [7]=> + string(5) "new.4" + [8]=> + string(5) "new.5" + [9]=> + string(5) "new.6" + [10]=> + string(5) "new.7" + [11]=> + &string(5) "new.8" + [12]=> + string(5) "new.9" + [13]=> + string(6) "new.10" + [14]=> + string(6) "new.11" +} + +Popping elements off an unreferenced array. +string(10) "original.1" +string(10) "original.2" +string(10) "original.3" +array(0) { +} + +Popping elements off an unreferenced array, using &$value. +string(10) "original.1" +string(10) "original.2" +array(1) { + [0]=> + string(10) "original.1" +} \ No newline at end of file diff --git a/tests/lang/foreachLoop.003.phpt b/tests/lang/foreachLoop.003.phpt new file mode 100644 index 0000000..d554d0d --- /dev/null +++ b/tests/lang/foreachLoop.003.phpt @@ -0,0 +1,46 @@ +--TEST-- +Foreach loop tests - error case: not an array. +--FILE-- + +--EXPECTF-- + +Not an array. + +Warning: Invalid argument supplied for foreach() in %s on line 4 + +Warning: Invalid argument supplied for foreach() in %s on line 9 + +Warning: Invalid argument supplied for foreach() in %s on line 14 + +Warning: Invalid argument supplied for foreach() in %s on line 19 + +Warning: Invalid argument supplied for foreach() in %s on line 24 +done. diff --git a/tests/lang/foreachLoop.004.phpt b/tests/lang/foreachLoop.004.phpt new file mode 100644 index 0000000..8cc6094 --- /dev/null +++ b/tests/lang/foreachLoop.004.phpt @@ -0,0 +1,76 @@ +--TEST-- +Foreach loop tests - using an array element as the $value +--FILE-- +$v[0]) { + var_dump($k, $v); +} +var_dump($a); +var_dump($k, $v); +?> +--EXPECT-- +array(1) { + [0]=> + string(1) "a" +} +array(1) { + [0]=> + string(1) "b" +} +array(1) { + [0]=> + string(1) "c" +} +array(3) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + string(1) "c" +} +array(1) { + [0]=> + string(1) "c" +} + +int(0) +array(1) { + [0]=> + string(1) "a" +} +int(1) +array(1) { + [0]=> + string(1) "b" +} +int(2) +array(1) { + [0]=> + string(1) "c" +} +array(3) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + string(1) "c" +} +int(2) +array(1) { + [0]=> + string(1) "c" +} \ No newline at end of file diff --git a/tests/lang/foreachLoop.005.phpt b/tests/lang/foreachLoop.005.phpt new file mode 100644 index 0000000..ae6ed3a --- /dev/null +++ b/tests/lang/foreachLoop.005.phpt @@ -0,0 +1,23 @@ +--TEST-- +Foreach loop tests - modifying the array during the loop: special case. Behaviour is good since php 5.2.2. +--FILE-- +&$v){ + $a[$k] = "changed.$k"; + echo "After changing \$a directly, \$v@$k is: $v\n"; +} +//--- Expected output: +//After changing $a directly, $v@0 is: changed.0 +//After changing $a directly, $v@1 is: changed.1 +//After changing $a directly, $v@2 is: changed.2 +//--- Actual output from php.net before 5.2.2: +//After changing $a directly, $v@0 is: changed.0 +//After changing $a directly, $v@1 is: original.1 +//After changing $a directly, $v@2 is: original.2 + +?> +--EXPECT-- +After changing $a directly, $v@0 is: changed.0 +After changing $a directly, $v@1 is: changed.1 +After changing $a directly, $v@2 is: changed.2 diff --git a/tests/lang/foreachLoop.006.phpt b/tests/lang/foreachLoop.006.phpt new file mode 100644 index 0000000..a90f924 --- /dev/null +++ b/tests/lang/foreachLoop.006.phpt @@ -0,0 +1,11 @@ +--TEST-- +Foreach loop tests - error case: key is a reference. +--FILE-- +$v) { + var_dump($v); +} +?> +--EXPECTF-- +Fatal error: Key element cannot be a reference in %s on line 3 \ No newline at end of file diff --git a/tests/lang/foreachLoop.007.phpt b/tests/lang/foreachLoop.007.phpt new file mode 100644 index 0000000..f47fdc7 --- /dev/null +++ b/tests/lang/foreachLoop.007.phpt @@ -0,0 +1,11 @@ +--TEST-- +Foreach loop tests - error case: reference to constant array. +--FILE-- + +--EXPECTF-- +Parse error: %s on line 3 diff --git a/tests/lang/foreachLoop.008.phpt b/tests/lang/foreachLoop.008.phpt new file mode 100644 index 0000000..787f43b --- /dev/null +++ b/tests/lang/foreachLoop.008.phpt @@ -0,0 +1,10 @@ +--TEST-- +Foreach loop tests - error case: reference to constant array, with key. +--FILE-- +&$v) { + var_dump($v); +} +?> +--EXPECTF-- +Fatal error: Cannot create references to elements of a temporary array expression in %s on line 2 diff --git a/tests/lang/foreachLoop.009.phpt b/tests/lang/foreachLoop.009.phpt new file mode 100644 index 0000000..4586a35 --- /dev/null +++ b/tests/lang/foreachLoop.009.phpt @@ -0,0 +1,82 @@ +--TEST-- +Foreach loop tests - foreach operates on the original array if the array is referenced outside the loop. +--FILE-- +$v1) { + array_pop($refedArray); + echo "key: $k; value: $v1\n"; +} + +echo "\nRemove elements from a referenced array during loop, using &\$value\n"; +$refedArray=array("original.0", "original.1", "original.2"); +$ref=&$refedArray; +foreach ($refedArray as $k=>&$v2) { + array_pop($refedArray); + echo "key: $k; value: $v2\n"; +} + +echo "\nAdd elements to a referenced array during loop\n"; +$refedArray=array("original.0", "original.1", "original.2"); +$ref=&$refedArray; +$count=0; +foreach ($refedArray as $k=>$v3) { + array_push($refedArray, "new.$k"); + echo "key: $k; value: $v3\n"; + + if ($count++>5) { + echo "Loop detected, as expected.\n"; + break; + } +} + +echo "\nAdd elements to a referenced array during loop, using &\$value\n"; +$refedArray=array("original.0", "original.1", "original.2"); +$ref=&$refedArray; +$count=0; +foreach ($refedArray as $k=>&$v4) { + array_push($refedArray, "new.$k"); + echo "key: $k; value: $v4\n"; + + if ($count++>5) { + echo "Loop detected, as expected.\n"; + break; + } +} + +?> +--EXPECT-- + +Remove elements from a referenced array during loop +key: 0; value: original.0 +key: 1; value: original.1 + +Remove elements from a referenced array during loop, using &$value +key: 0; value: original.0 +key: 1; value: original.1 + +Add elements to a referenced array during loop +key: 0; value: original.0 +key: 1; value: original.1 +key: 2; value: original.2 +key: 3; value: new.0 +key: 4; value: new.1 +key: 5; value: new.2 +key: 6; value: new.3 +Loop detected, as expected. + +Add elements to a referenced array during loop, using &$value +key: 0; value: original.0 +key: 1; value: original.1 +key: 2; value: original.2 +key: 3; value: new.0 +key: 4; value: new.1 +key: 5; value: new.2 +key: 6; value: new.3 +Loop detected, as expected. + diff --git a/tests/lang/foreachLoop.010.phpt b/tests/lang/foreachLoop.010.phpt new file mode 100644 index 0000000..a7a3e97 --- /dev/null +++ b/tests/lang/foreachLoop.010.phpt @@ -0,0 +1,40 @@ +--TEST-- +This test illustrates the impact of invoking destructors when refcount is decremented to 0 on foreach. +It will pass only if the 'contentious code' in PHPValue.decReferences() is enabled. +--FILE-- +10) { + echo "Infinite loop detected\n"; + break; + } +} + +?> +--EXPECTF-- +int(1) +int(2) +int(3) \ No newline at end of file diff --git a/tests/lang/foreachLoop.011.phpt b/tests/lang/foreachLoop.011.phpt new file mode 100644 index 0000000..94cb605 --- /dev/null +++ b/tests/lang/foreachLoop.011.phpt @@ -0,0 +1,34 @@ +--TEST-- +Changing from an interable type to a non iterable type during the iteration +--FILE-- +a=1; +$a->b=2; +$b=&$a; +foreach ($a as $v) { + var_dump($v); + $b='x'; +} + +?> +--EXPECTF-- + +Change from array to non iterable: +int(1) + +Warning: Invalid argument supplied for foreach() in %s on line 5 + +Change from object to non iterable: +int(1) + +Warning: Invalid argument supplied for foreach() in %s on line 15 \ No newline at end of file diff --git a/tests/lang/foreachLoop.012.phpt b/tests/lang/foreachLoop.012.phpt new file mode 100644 index 0000000..1165b74 --- /dev/null +++ b/tests/lang/foreachLoop.012.phpt @@ -0,0 +1,494 @@ +--TEST-- +Directly modifying an unreferenced array when foreach'ing over it. +--FILE-- + State of array before loop:\n"; + var_dump($a); + + echo "--> Do loop:\n"; + foreach ($a as $k=>$v) { + echo " iteration $counter: \$k=$k; \$v=$v\n"; + eval($transform); + $counter++; + if ($counter>MAX_LOOPS) { + echo " ** Stuck in a loop! **\n"; + break; + } + } + + echo "--> State of array after loop:\n"; + var_dump($a); +} + + +echo "\nPopping elements off end of an unreferenced array"; +$transform = 'array_pop($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nShift elements off start of an unreferenced array"; +$transform = 'array_shift($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nRemove current element of an unreferenced array"; +$transform = 'unset($a[$k]);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the end of an unreferenced array"; +$transform = 'array_push($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the start of an unreferenced array"; +$transform = 'array_unshift($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +?> +--EXPECTF-- + +Popping elements off end of an unreferenced array +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Shift elements off start of an unreferenced array +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Remove current element of an unreferenced array +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Adding elements to the end of an unreferenced array +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(5) "new.0" +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(5) "new.0" + [3]=> + string(5) "new.1" +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(6) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.2" +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(8) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" + [4]=> + string(5) "new.0" + [5]=> + string(5) "new.1" + [6]=> + string(5) "new.2" + [7]=> + string(5) "new.3" +} + + + +Adding elements to the start of an unreferenced array +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(5) "new.0" + [1]=> + string(3) "v.0" +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(4) { + [0]=> + string(5) "new.1" + [1]=> + string(5) "new.0" + [2]=> + string(3) "v.0" + [3]=> + string(3) "v.1" +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(6) { + [0]=> + string(5) "new.2" + [1]=> + string(5) "new.1" + [2]=> + string(5) "new.0" + [3]=> + string(3) "v.0" + [4]=> + string(3) "v.1" + [5]=> + string(3) "v.2" +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(8) { + [0]=> + string(5) "new.3" + [1]=> + string(5) "new.2" + [2]=> + string(5) "new.1" + [3]=> + string(5) "new.0" + [4]=> + string(3) "v.0" + [5]=> + string(3) "v.1" + [6]=> + string(3) "v.2" + [7]=> + string(3) "v.3" +} diff --git a/tests/lang/foreachLoop.013.phpt b/tests/lang/foreachLoop.013.phpt new file mode 100644 index 0000000..3dec119 --- /dev/null +++ b/tests/lang/foreachLoop.013.phpt @@ -0,0 +1,555 @@ +--TEST-- +Directly modifying an unreferenced array when foreach'ing over it while using &$value syntax. +--FILE-- + State of array before loop:\n"; + var_dump($a); + + echo "--> Do loop:\n"; + foreach ($a as $k=>&$v) { + echo " iteration $counter: \$k=$k; \$v=$v\n"; + eval($transform); + $counter++; + if ($counter>MAX_LOOPS) { + echo " ** Stuck in a loop! **\n"; + break; + } + } + + echo "--> State of array after loop:\n"; + var_dump($a); +} + + +echo "\nPopping elements off end of an unreferenced array, using &\$value."; +$transform = 'array_pop($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nShift elements off start of an unreferenced array, using &\$value."; +$transform = 'array_shift($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nRemove current element of an unreferenced array, using &\$value."; +$transform = 'unset($a[$k]);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the end of an unreferenced array, using &\$value."; +$transform = 'array_push($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the start of an unreferenced array, using &\$value."; +$transform = 'array_unshift($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +?> +--EXPECTF-- + +Popping elements off end of an unreferenced array, using &$value. +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(1) { + [0]=> + string(3) "v.0" +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=0; $v=v.0 + iteration 3: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + + + +Shift elements off start of an unreferenced array, using &$value. +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 + iteration 3: $k=0; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Remove current element of an unreferenced array, using &$value. +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Adding elements to the end of an unreferenced array, using &$value. +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + &string(3) "v.0" + [1]=> + string(5) "new.0" +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=new.0 + iteration 3: $k=3; $v=new.1 + iteration 4: $k=4; $v=new.2 + iteration 5: $k=5; $v=new.3 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(5) "new.0" + [3]=> + string(5) "new.1" + [4]=> + string(5) "new.2" + [5]=> + &string(5) "new.3" + [6]=> + string(5) "new.4" + [7]=> + string(5) "new.5" +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=new.0 + iteration 4: $k=4; $v=new.1 + iteration 5: $k=5; $v=new.2 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + &string(5) "new.2" + [6]=> + string(5) "new.3" + [7]=> + string(5) "new.4" + [8]=> + string(5) "new.5" +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 + iteration 4: $k=4; $v=new.0 + iteration 5: $k=5; $v=new.1 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" + [4]=> + string(5) "new.0" + [5]=> + &string(5) "new.1" + [6]=> + string(5) "new.2" + [7]=> + string(5) "new.3" + [8]=> + string(5) "new.4" + [9]=> + string(5) "new.5" +} + + + +Adding elements to the start of an unreferenced array, using &$value. +---( Array with 1 element(s): )--- +--> State of array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(5) "new.0" + [1]=> + &string(3) "v.0" +} + +---( Array with 2 element(s): )--- +--> State of array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" +} + +---( Array with 3 element(s): )--- +--> State of array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" +} + +---( Array with 4 element(s): )--- +--> State of array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" + [9]=> + string(3) "v.3" +} diff --git a/tests/lang/foreachLoop.014.phpt b/tests/lang/foreachLoop.014.phpt new file mode 100644 index 0000000..ab3c657 --- /dev/null +++ b/tests/lang/foreachLoop.014.phpt @@ -0,0 +1,556 @@ +--TEST-- +Directly modifying a REFERENCED array when foreach'ing over it. +--FILE-- + State of referenced array before loop:\n"; + var_dump($a); + + echo "--> Do loop:\n"; + foreach ($a as $k=>$v) { + echo " iteration $counter: \$k=$k; \$v=$v\n"; + eval($transform); + $counter++; + if ($counter>MAX_LOOPS) { + echo " ** Stuck in a loop! **\n"; + break; + } + } + + echo "--> State of array after loop:\n"; + var_dump($a); +} + + +echo "\nPopping elements off end of a referenced array"; +$transform = 'array_pop($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nShift elements off start of a referenced array"; +$transform = 'array_shift($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nRemove current element of a referenced array"; +$transform = 'unset($a[$k]);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the end of a referenced array"; +$transform = 'array_push($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the start of a referenced array"; +$transform = 'array_unshift($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +?> +--EXPECTF-- +Popping elements off end of a referenced array +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(1) { + [0]=> + string(3) "v.0" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=0; $v=v.0 + iteration 3: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + + + +Shift elements off start of a referenced array +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 + iteration 3: $k=0; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Remove current element of a referenced array +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Adding elements to the end of a referenced array +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(5) "new.0" +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=new.0 + iteration 3: $k=3; $v=new.1 + iteration 4: $k=4; $v=new.2 + iteration 5: $k=5; $v=new.3 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(5) "new.0" + [3]=> + string(5) "new.1" + [4]=> + string(5) "new.2" + [5]=> + string(5) "new.3" + [6]=> + string(5) "new.4" + [7]=> + string(5) "new.5" +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=new.0 + iteration 4: $k=4; $v=new.1 + iteration 5: $k=5; $v=new.2 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.2" + [6]=> + string(5) "new.3" + [7]=> + string(5) "new.4" + [8]=> + string(5) "new.5" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 + iteration 4: $k=4; $v=new.0 + iteration 5: $k=5; $v=new.1 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" + [4]=> + string(5) "new.0" + [5]=> + string(5) "new.1" + [6]=> + string(5) "new.2" + [7]=> + string(5) "new.3" + [8]=> + string(5) "new.4" + [9]=> + string(5) "new.5" +} + + + +Adding elements to the start of a referenced array +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(5) "new.0" + [1]=> + string(3) "v.0" +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(5) "new.5" + [1]=> + string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(5) "new.5" + [1]=> + string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(5) "new.5" + [1]=> + string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" + [9]=> + string(3) "v.3" +} \ No newline at end of file diff --git a/tests/lang/foreachLoop.015.phpt b/tests/lang/foreachLoop.015.phpt new file mode 100644 index 0000000..dfba159 --- /dev/null +++ b/tests/lang/foreachLoop.015.phpt @@ -0,0 +1,557 @@ +--TEST-- +Directly modifying a REFERENCED array when foreach'ing over it while using &$value syntax. +--FILE-- + State of referenced array before loop:\n"; + var_dump($a); + + echo "--> Do loop:\n"; + foreach ($a as $k=>&$v) { + echo " iteration $counter: \$k=$k; \$v=$v\n"; + eval($transform); + $counter++; + if ($counter>MAX_LOOPS) { + echo " ** Stuck in a loop! **\n"; + break; + } + } + + echo "--> State of array after loop:\n"; + var_dump($a); +} + + +echo "\nPopping elements off end of a referenced array, using &\$value"; +$transform = 'array_pop($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nShift elements off start of a referenced array, using &\$value"; +$transform = 'array_shift($a);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nRemove current element of a referenced array, using &\$value"; +$transform = 'unset($a[$k]);'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the end of a referenced array, using &\$value"; +$transform = 'array_push($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +echo "\n\n\nAdding elements to the start of a referenced array, using &\$value"; +$transform = 'array_unshift($a, "new.$counter");'; +withRefValue(1, $transform); +withRefValue(2, $transform); +withRefValue(3, $transform); +withRefValue(4, $transform); + +?> +--EXPECTF-- + +Popping elements off end of a referenced array, using &$value +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(1) { + [0]=> + string(3) "v.0" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=0; $v=v.0 + iteration 3: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + + + +Shift elements off start of a referenced array, using &$value +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=v.1 + iteration 2: $k=0; $v=v.2 + iteration 3: $k=0; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Remove current element of a referenced array, using &$value +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(0) { +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 +--> State of array after loop: +array(0) { +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 +--> State of array after loop: +array(0) { +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 +--> State of array after loop: +array(0) { +} + + + +Adding elements to the end of a referenced array, using &$value +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + &string(3) "v.0" + [1]=> + string(5) "new.0" +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=new.0 + iteration 3: $k=3; $v=new.1 + iteration 4: $k=4; $v=new.2 + iteration 5: $k=5; $v=new.3 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(5) "new.0" + [3]=> + string(5) "new.1" + [4]=> + string(5) "new.2" + [5]=> + &string(5) "new.3" + [6]=> + string(5) "new.4" + [7]=> + string(5) "new.5" +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=new.0 + iteration 4: $k=4; $v=new.1 + iteration 5: $k=5; $v=new.2 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(5) "new.0" + [4]=> + string(5) "new.1" + [5]=> + &string(5) "new.2" + [6]=> + string(5) "new.3" + [7]=> + string(5) "new.4" + [8]=> + string(5) "new.5" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=1; $v=v.1 + iteration 2: $k=2; $v=v.2 + iteration 3: $k=3; $v=v.3 + iteration 4: $k=4; $v=new.0 + iteration 5: $k=5; $v=new.1 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" + [4]=> + string(5) "new.0" + [5]=> + &string(5) "new.1" + [6]=> + string(5) "new.2" + [7]=> + string(5) "new.3" + [8]=> + string(5) "new.4" + [9]=> + string(5) "new.5" +} + + + +Adding elements to the start of a referenced array, using &$value +---( Array with 1 element(s): )--- +--> State of referenced array before loop: +array(1) { + [0]=> + string(3) "v.0" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 +--> State of array after loop: +array(2) { + [0]=> + string(5) "new.0" + [1]=> + &string(3) "v.0" +} + +---( Array with 2 element(s): )--- +--> State of referenced array before loop: +array(2) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(8) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" +} + +---( Array with 3 element(s): )--- +--> State of referenced array before loop: +array(3) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(9) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" +} + +---( Array with 4 element(s): )--- +--> State of referenced array before loop: +array(4) { + [0]=> + string(3) "v.0" + [1]=> + string(3) "v.1" + [2]=> + string(3) "v.2" + [3]=> + string(3) "v.3" +} +--> Do loop: + iteration 0: $k=0; $v=v.0 + iteration 1: $k=0; $v=new.0 + iteration 2: $k=0; $v=new.1 + iteration 3: $k=0; $v=new.2 + iteration 4: $k=0; $v=new.3 + iteration 5: $k=0; $v=new.4 + ** Stuck in a loop! ** +--> State of array after loop: +array(10) { + [0]=> + string(5) "new.5" + [1]=> + &string(5) "new.4" + [2]=> + string(5) "new.3" + [3]=> + string(5) "new.2" + [4]=> + string(5) "new.1" + [5]=> + string(5) "new.0" + [6]=> + string(3) "v.0" + [7]=> + string(3) "v.1" + [8]=> + string(3) "v.2" + [9]=> + string(3) "v.3" +} diff --git a/tests/lang/foreachLoop.016.phpt b/tests/lang/foreachLoop.016.phpt new file mode 100644 index 0000000..d570aba --- /dev/null +++ b/tests/lang/foreachLoop.016.phpt @@ -0,0 +1,206 @@ +--TEST-- +Ensure foreach splits the iterated entity from its cow reference set, for all sorts of iterated entities. +--FILE-- +&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '${\'a\'}' . "\n"; + $b = $a = array('original'); + foreach(${'a'} as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$$a' . "\n"; + $a = 'blah'; + $$a = array('original'); + $b = $$a; + foreach($$a as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a[0]' . "\n"; + $b = $a[0] = array('original'); + foreach($a[0] as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a[0][0]' . "\n"; + $b = $a[0][0] = array('original'); + foreach($a[0][0] as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a->b' . "\n"; + $b = $a->b = array('original'); + foreach($a->b as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a->b->c' . "\n"; + $b = $a->b->c = array('original'); + foreach($a->b as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a->b[0]' . "\n"; + $b = $a->b[0] = array('original'); + foreach($a->b[0] as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a->b[0][0]' . "\n"; + $b = $a->b[0][0] = array('original'); + foreach($a->b[0][0] as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . '$a->b[0]->c' . "\n"; + $b = $a->b[0]->c = array('original'); + foreach($a->b[0]->c as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + class C { + public static $a; + } + + echo "\n" . 'C::$a' . "\n"; + C::$a = array('original'); + $b = C::$a; + foreach(C::$a as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset($a, $b); + + echo "\n" . 'C::$a[0]' . "\n"; + C::$a[0] = array('original'); + $b = C::$a[0]; + foreach(C::$a[0] as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset(C::$a[0], $b); + + echo "\n" . 'C::$a[0]->b' . "\n"; + C::$a[0]->b = array('original'); + $b = C::$a[0]->b; + foreach(C::$a[0]->b as $k=>&$v) { + $v = 'changed'; + } + var_dump($b); + unset(C::$a[0]->b, $b); +?> +--EXPECTF-- + +$a +array(1) { + [0]=> + string(8) "original" +} + +${'a'} +array(1) { + [0]=> + string(8) "original" +} + +$$a +array(1) { + [0]=> + string(8) "original" +} + +$a[0] +array(1) { + [0]=> + string(8) "original" +} + +$a[0][0] +array(1) { + [0]=> + string(8) "original" +} + +$a->b + +Warning: Creating default object from empty value in %s on line %d +array(1) { + [0]=> + string(8) "original" +} + +$a->b->c + +Warning: Creating default object from empty value in %s on line %d +array(1) { + [0]=> + string(8) "original" +} + +$a->b[0] +array(1) { + [0]=> + string(8) "original" +} + +$a->b[0][0] +array(1) { + [0]=> + string(8) "original" +} + +$a->b[0]->c + +Warning: Creating default object from empty value in %s on line %d +array(1) { + [0]=> + string(8) "original" +} + +C::$a +array(1) { + [0]=> + string(8) "original" +} + +C::$a[0] +array(1) { + [0]=> + string(8) "original" +} + +C::$a[0]->b + +Warning: Creating default object from empty value in %s on line %d +array(1) { + [0]=> + string(8) "original" +} diff --git a/tests/lang/foreachLoop.017.phpt b/tests/lang/foreachLoop.017.phpt new file mode 100644 index 0000000..3d2618e --- /dev/null +++ b/tests/lang/foreachLoop.017.phpt @@ -0,0 +1,11 @@ +--TEST-- +Ensure foreach works with arrays with Binary keys. +--FILE-- + 10 ); +foreach ($a as $val=>$key) echo $key; +echo "\nDone\n"; +?> +--EXPECTF-- +10 +Done \ No newline at end of file diff --git a/tests/lang/foreachLoopIterator.001.phpt b/tests/lang/foreachLoopIterator.001.phpt new file mode 100644 index 0000000..c049cb7 --- /dev/null +++ b/tests/lang/foreachLoopIterator.001.phpt @@ -0,0 +1,134 @@ +--TEST-- +foreach with Iterator. +--FILE-- + " . __METHOD__ . " ($this->pos)\n"; + return $this->pos<3; + } + + public function next() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos++]; + } + + public function rewind() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos=0; + } + + public function current() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos]; + } + + public function key() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return "meal " . $this->pos; + } + +} + +$f = new MealIterator; +var_dump($f); + +echo "-----( Simple iteration: )-----\n"; +foreach ($f as $k=>$v) { + echo "$k => $v\n"; +} + +$f->rewind(); + +$indent = " "; + +echo "\n\n\n-----( Nested iteration: )-----\n"; +$count=1; +foreach ($f as $k=>$v) { + echo "\nTop level " . $count++ . ": \n"; + echo "$k => $v\n"; + $indent = " "; + foreach ($f as $k=>$v) { + echo " $k => $v\n"; + } + $indent = " "; + +} + +?> +===DONE=== +--EXPECTF-- +object(MealIterator)#%d (2) { + ["pos":"MealIterator":private]=> + int(0) + ["myContent":"MealIterator":private]=> + array(3) { + [0]=> + string(9) "breakfast" + [1]=> + string(5) "lunch" + [2]=> + string(6) "dinner" + } +} +-----( Simple iteration: )----- +--> MealIterator::rewind (0) +--> MealIterator::valid (0) +--> MealIterator::current (0) +--> MealIterator::key (0) +meal 0 => breakfast +--> MealIterator::next (0) +--> MealIterator::valid (1) +--> MealIterator::current (1) +--> MealIterator::key (1) +meal 1 => lunch +--> MealIterator::next (1) +--> MealIterator::valid (2) +--> MealIterator::current (2) +--> MealIterator::key (2) +meal 2 => dinner +--> MealIterator::next (2) +--> MealIterator::valid (3) +--> MealIterator::rewind (3) + + + +-----( Nested iteration: )----- + --> MealIterator::rewind (0) + --> MealIterator::valid (0) + --> MealIterator::current (0) + --> MealIterator::key (0) + +Top level 1: +meal 0 => breakfast + --> MealIterator::rewind (0) + --> MealIterator::valid (0) + --> MealIterator::current (0) + --> MealIterator::key (0) + meal 0 => breakfast + --> MealIterator::next (0) + --> MealIterator::valid (1) + --> MealIterator::current (1) + --> MealIterator::key (1) + meal 1 => lunch + --> MealIterator::next (1) + --> MealIterator::valid (2) + --> MealIterator::current (2) + --> MealIterator::key (2) + meal 2 => dinner + --> MealIterator::next (2) + --> MealIterator::valid (3) + --> MealIterator::next (3) + +Notice: Undefined offset: 3 in %s on line %d + --> MealIterator::valid (4) +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopIterator.002.phpt b/tests/lang/foreachLoopIterator.002.phpt new file mode 100644 index 0000000..f40e09b --- /dev/null +++ b/tests/lang/foreachLoopIterator.002.phpt @@ -0,0 +1,24 @@ +--TEST-- +foreach with iterator and &$value reference +--FILE-- +&$v) { + echo "$k => $v\n"; +} + +?> +--EXPECTF-- +-----( Try to iterate with &$value: )----- + +Fatal error: An iterator cannot be used with foreach by reference in %s on line 13 \ No newline at end of file diff --git a/tests/lang/foreachLoopIteratorAggregate.001.phpt b/tests/lang/foreachLoopIteratorAggregate.001.phpt new file mode 100644 index 0000000..b20d3ea --- /dev/null +++ b/tests/lang/foreachLoopIteratorAggregate.001.phpt @@ -0,0 +1,270 @@ +--TEST-- +foreach with iteratorAggregate +--FILE-- + " . __METHOD__ . " ($this->pos)\n"; + return $this->pos < count($this->myContent); + } + + public function next() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos++; + } + + public function rewind() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos=0; + } + + public function current() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos]; + } + + public function key() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return "meal " . $this->pos; + } + +} + +class FrenchMealIterator implements Iterator { + private $pos=0; + private $myContent=array("petit dejeuner", "dejeuner", "gouter", "dinner"); + + public function valid() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->pos < count($this->myContent); + } + + public function next() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos++; + } + + public function rewind() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos=0; + } + + public function current() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos]; + } + + public function key() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return "meal " . $this->pos; + } + +} + + +Class EuropeanMeals implements IteratorAggregate { + + private $storedEnglishMealIterator; + private $storedFrenchMealIterator; + + public function __construct() { + $this->storedEnglishMealIterator = new EnglishMealIterator; + $this->storedFrenchMealIterator = new FrenchMealIterator; + } + + public function getIterator() { + global $indent; + echo "$indent--> " . __METHOD__ . "\n"; + + //Alternate between English and French meals + static $i = 0; + if ($i++%2 == 0) { + return $this->storedEnglishMealIterator; + } else { + return $this->storedFrenchMealIterator; + } + } + +} + +$f = new EuropeanMeals; +var_dump($f); + +echo "-----( Simple iteration 1: )-----\n"; +foreach ($f as $k=>$v) { + echo "$k => $v\n"; +} +echo "-----( Simple iteration 2: )-----\n"; +foreach ($f as $k=>$v) { + echo "$k => $v\n"; +} + + +$indent = " "; +echo "\n\n\n-----( Nested iteration: )-----\n"; +$count=1; +foreach ($f as $k=>$v) { + echo "\nTop level " . $count++ . ": \n"; + echo "$k => $v\n"; + $indent = " "; + foreach ($f as $k=>$v) { + echo " $k => $v\n"; + } + $indent = " "; +} + + +?> +===DONE=== +--EXPECTF-- +object(EuropeanMeals)#%d (2) { + ["storedEnglishMealIterator":"EuropeanMeals":private]=> + object(EnglishMealIterator)#%d (2) { + ["pos":"EnglishMealIterator":private]=> + int(0) + ["myContent":"EnglishMealIterator":private]=> + array(3) { + [0]=> + string(9) "breakfast" + [1]=> + string(6) "dinner" + [2]=> + string(3) "tea" + } + } + ["storedFrenchMealIterator":"EuropeanMeals":private]=> + object(FrenchMealIterator)#%d (2) { + ["pos":"FrenchMealIterator":private]=> + int(0) + ["myContent":"FrenchMealIterator":private]=> + array(4) { + [0]=> + string(14) "petit dejeuner" + [1]=> + string(8) "dejeuner" + [2]=> + string(6) "gouter" + [3]=> + string(6) "dinner" + } + } +} +-----( Simple iteration 1: )----- +--> EuropeanMeals::getIterator +--> EnglishMealIterator::rewind (0) +--> EnglishMealIterator::valid (0) +--> EnglishMealIterator::current (0) +--> EnglishMealIterator::key (0) +meal 0 => breakfast +--> EnglishMealIterator::next (0) +--> EnglishMealIterator::valid (1) +--> EnglishMealIterator::current (1) +--> EnglishMealIterator::key (1) +meal 1 => dinner +--> EnglishMealIterator::next (1) +--> EnglishMealIterator::valid (2) +--> EnglishMealIterator::current (2) +--> EnglishMealIterator::key (2) +meal 2 => tea +--> EnglishMealIterator::next (2) +--> EnglishMealIterator::valid (3) +-----( Simple iteration 2: )----- +--> EuropeanMeals::getIterator +--> FrenchMealIterator::rewind (0) +--> FrenchMealIterator::valid (0) +--> FrenchMealIterator::current (0) +--> FrenchMealIterator::key (0) +meal 0 => petit dejeuner +--> FrenchMealIterator::next (0) +--> FrenchMealIterator::valid (1) +--> FrenchMealIterator::current (1) +--> FrenchMealIterator::key (1) +meal 1 => dejeuner +--> FrenchMealIterator::next (1) +--> FrenchMealIterator::valid (2) +--> FrenchMealIterator::current (2) +--> FrenchMealIterator::key (2) +meal 2 => gouter +--> FrenchMealIterator::next (2) +--> FrenchMealIterator::valid (3) +--> FrenchMealIterator::current (3) +--> FrenchMealIterator::key (3) +meal 3 => dinner +--> FrenchMealIterator::next (3) +--> FrenchMealIterator::valid (4) + + + +-----( Nested iteration: )----- + --> EuropeanMeals::getIterator + --> EnglishMealIterator::rewind (3) + --> EnglishMealIterator::valid (0) + --> EnglishMealIterator::current (0) + --> EnglishMealIterator::key (0) + +Top level 1: +meal 0 => breakfast + --> EuropeanMeals::getIterator + --> FrenchMealIterator::rewind (4) + --> FrenchMealIterator::valid (0) + --> FrenchMealIterator::current (0) + --> FrenchMealIterator::key (0) + meal 0 => petit dejeuner + --> FrenchMealIterator::next (0) + --> FrenchMealIterator::valid (1) + --> FrenchMealIterator::current (1) + --> FrenchMealIterator::key (1) + meal 1 => dejeuner + --> FrenchMealIterator::next (1) + --> FrenchMealIterator::valid (2) + --> FrenchMealIterator::current (2) + --> FrenchMealIterator::key (2) + meal 2 => gouter + --> FrenchMealIterator::next (2) + --> FrenchMealIterator::valid (3) + --> FrenchMealIterator::current (3) + --> FrenchMealIterator::key (3) + meal 3 => dinner + --> FrenchMealIterator::next (3) + --> FrenchMealIterator::valid (4) + --> EnglishMealIterator::next (0) + --> EnglishMealIterator::valid (1) + --> EnglishMealIterator::current (1) + --> EnglishMealIterator::key (1) + +Top level 2: +meal 1 => dinner + --> EuropeanMeals::getIterator + --> EnglishMealIterator::rewind (1) + --> EnglishMealIterator::valid (0) + --> EnglishMealIterator::current (0) + --> EnglishMealIterator::key (0) + meal 0 => breakfast + --> EnglishMealIterator::next (0) + --> EnglishMealIterator::valid (1) + --> EnglishMealIterator::current (1) + --> EnglishMealIterator::key (1) + meal 1 => dinner + --> EnglishMealIterator::next (1) + --> EnglishMealIterator::valid (2) + --> EnglishMealIterator::current (2) + --> EnglishMealIterator::key (2) + meal 2 => tea + --> EnglishMealIterator::next (2) + --> EnglishMealIterator::valid (3) + --> EnglishMealIterator::next (3) + --> EnglishMealIterator::valid (4) +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopIteratorAggregate.002.phpt b/tests/lang/foreachLoopIteratorAggregate.002.phpt new file mode 100644 index 0000000..eef4302 --- /dev/null +++ b/tests/lang/foreachLoopIteratorAggregate.002.phpt @@ -0,0 +1,53 @@ +--TEST-- +IteratorAggregate::getIterator bad return type +--FILE-- +$v) { + echo "$k => $v\n"; + } + } catch (Exception $e) { + echo $e->getLine() . ": " . $e->getMessage() ."\n"; + } +} + +f("bad1"); +f("bad2"); +f("bad3"); +f("bad4"); + +?> +===DONE=== +--EXPECTF-- +30: Objects returned by bad1::getIterator() must be traversable or implement interface Iterator +30: Objects returned by bad2::getIterator() must be traversable or implement interface Iterator +30: Objects returned by bad3::getIterator() must be traversable or implement interface Iterator +30: Objects returned by bad4::getIterator() must be traversable or implement interface Iterator +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopIteratorAggregate.003.phpt b/tests/lang/foreachLoopIteratorAggregate.003.phpt new file mode 100644 index 0000000..0a0e23c --- /dev/null +++ b/tests/lang/foreachLoopIteratorAggregate.003.phpt @@ -0,0 +1,133 @@ +--TEST-- +foreach with nested iteratorAggregates +--FILE-- + " . __METHOD__ . " ($this->pos)\n"; + return $this->pos<3; + } + + public function next() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos++]; + } + + public function rewind() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + $this->pos=0; + } + + public function current() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return $this->myContent[$this->pos]; + } + + public function key() { + global $indent; + echo "$indent--> " . __METHOD__ . " ($this->pos)\n"; + return "meal " . $this->pos; + } + +} + +class A1 implements IteratorAggregate { + function getIterator() { + return new EnglishMealIterator; + } +} + +class A2 implements IteratorAggregate { + function getIterator() { + return new A1; + } +} + +class A3 implements IteratorAggregate { + function getIterator() { + return new A2; + } +} + +echo "\n-----( A1: )-----\n"; +foreach (new A1 as $k=>$v) { + echo "$k => $v\n"; +} + +echo "\n-----( A2: )-----\n"; +foreach (new A2 as $k=>$v) { + echo "$k => $v\n"; +} + +echo "\n-----( A3: )-----\n"; +foreach (new A3 as $k=>$v) { + echo "$k => $v\n"; +} + +?> +===DONE=== +--EXPECTF-- +-----( A1: )----- +--> EnglishMealIterator::rewind (0) +--> EnglishMealIterator::valid (0) +--> EnglishMealIterator::current (0) +--> EnglishMealIterator::key (0) +meal 0 => breakfast +--> EnglishMealIterator::next (0) +--> EnglishMealIterator::valid (1) +--> EnglishMealIterator::current (1) +--> EnglishMealIterator::key (1) +meal 1 => dinner +--> EnglishMealIterator::next (1) +--> EnglishMealIterator::valid (2) +--> EnglishMealIterator::current (2) +--> EnglishMealIterator::key (2) +meal 2 => tea +--> EnglishMealIterator::next (2) +--> EnglishMealIterator::valid (3) + +-----( A2: )----- +--> EnglishMealIterator::rewind (0) +--> EnglishMealIterator::valid (0) +--> EnglishMealIterator::current (0) +--> EnglishMealIterator::key (0) +meal 0 => breakfast +--> EnglishMealIterator::next (0) +--> EnglishMealIterator::valid (1) +--> EnglishMealIterator::current (1) +--> EnglishMealIterator::key (1) +meal 1 => dinner +--> EnglishMealIterator::next (1) +--> EnglishMealIterator::valid (2) +--> EnglishMealIterator::current (2) +--> EnglishMealIterator::key (2) +meal 2 => tea +--> EnglishMealIterator::next (2) +--> EnglishMealIterator::valid (3) + +-----( A3: )----- +--> EnglishMealIterator::rewind (0) +--> EnglishMealIterator::valid (0) +--> EnglishMealIterator::current (0) +--> EnglishMealIterator::key (0) +meal 0 => breakfast +--> EnglishMealIterator::next (0) +--> EnglishMealIterator::valid (1) +--> EnglishMealIterator::current (1) +--> EnglishMealIterator::key (1) +meal 1 => dinner +--> EnglishMealIterator::next (1) +--> EnglishMealIterator::valid (2) +--> EnglishMealIterator::current (2) +--> EnglishMealIterator::key (2) +meal 2 => tea +--> EnglishMealIterator::next (2) +--> EnglishMealIterator::valid (3) +===DONE=== diff --git a/tests/lang/foreachLoopIteratorAggregate.004.phpt b/tests/lang/foreachLoopIteratorAggregate.004.phpt new file mode 100644 index 0000000..9a1e612 --- /dev/null +++ b/tests/lang/foreachLoopIteratorAggregate.004.phpt @@ -0,0 +1,104 @@ +--TEST-- +Duplicate of zend test tests/classes/iterators_002.phpt without expected output from destructor +--FILE-- +obj = $obj; + } + function rewind() { + echo __METHOD__ . "\n"; + $this->num = 0; + } + function valid() { + $more = $this->num < $this->obj->max; + echo __METHOD__ . ' = ' .($more ? 'true' : 'false') . "\n"; + return $more; + } + function current() { + echo __METHOD__ . "\n"; + return $this->num; + } + function next() { + echo __METHOD__ . "\n"; + $this->num++; + } + function key() { + echo __METHOD__ . "\n"; + switch($this->num) { + case 0: return "1st"; + case 1: return "2nd"; + case 2: return "3rd"; + default: return "???"; + } + } + function __destruct() { + } +} + +class c implements IteratorAggregate { + + public $max = 3; + + function getIterator() { + echo __METHOD__ . "\n"; + return new c_iter($this); + } + function __destruct() { + } +} + +$t = new c(); + +foreach($t as $k => $v) { + foreach($t as $w) { + echo "double:$v:$w\n"; + break; + } +} + +unset($t); + +?> +===DONE=== +--EXPECT-- +c::getIterator +c_iter::__construct +c_iter::rewind +c_iter::valid = true +c_iter::current +c_iter::key +c::getIterator +c_iter::__construct +c_iter::rewind +c_iter::valid = true +c_iter::current +double:0:0 +c_iter::next +c_iter::valid = true +c_iter::current +c_iter::key +c::getIterator +c_iter::__construct +c_iter::rewind +c_iter::valid = true +c_iter::current +double:1:0 +c_iter::next +c_iter::valid = true +c_iter::current +c_iter::key +c::getIterator +c_iter::__construct +c_iter::rewind +c_iter::valid = true +c_iter::current +double:2:0 +c_iter::next +c_iter::valid = false +===DONE=== diff --git a/tests/lang/foreachLoopObjects.001.phpt b/tests/lang/foreachLoopObjects.001.phpt new file mode 100644 index 0000000..e6047b7 --- /dev/null +++ b/tests/lang/foreachLoopObjects.001.phpt @@ -0,0 +1,69 @@ +--TEST-- +Foreach loop on objects - basic loop with just value and key => value. +--FILE-- + $v) { + var_dump($k, $v); +} +echo "\nCheck key and value after the loop.\n"; +var_dump($k, $v); + + +echo "\n\nObject instantiated inside loop.\n"; +foreach (new C as $v) { + var_dump($v); +} +foreach (new C as $k => $v) { + var_dump($k, $v); +} +echo "\nCheck key and value after the loop.\n"; +var_dump($k, $v); +?> +--EXPECTF-- + + +Simple loop. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(1) "a" +string(10) "Original a" +string(1) "b" +string(10) "Original b" +string(1) "c" +string(10) "Original c" + +Check key and value after the loop. +string(1) "c" +string(10) "Original c" + + +Object instantiated inside loop. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(1) "a" +string(10) "Original a" +string(1) "b" +string(10) "Original b" +string(1) "c" +string(10) "Original c" + +Check key and value after the loop. +string(1) "c" +string(10) "Original c" \ No newline at end of file diff --git a/tests/lang/foreachLoopObjects.002.phpt b/tests/lang/foreachLoopObjects.002.phpt new file mode 100644 index 0000000..0b06f2b --- /dev/null +++ b/tests/lang/foreachLoopObjects.002.phpt @@ -0,0 +1,587 @@ +--TEST-- +Foreach loop tests - visibility. +--FILE-- +&$v) { + var_dump($v); + $v="changed.$k"; + } + } + + static function doForEach($obj) { + echo "in C::doForEach\n"; + foreach ($obj as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } + + function doForEachOnThis() { + echo "in C::doForEachOnThis\n"; + foreach ($this as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } + +} + +class D extends C { + + private $f = "Original f"; + protected $g = "Original g"; + + static function doForEach($obj) { + echo "in D::doForEach\n"; + foreach ($obj as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } + + function doForEachOnThis() { + echo "in D::doForEachOnThis\n"; + foreach ($this as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } +} + +class E extends D { + public $a = "Overridden a"; + public $b = "Overridden b"; + public $c = "Overridden c"; + protected $d = "Overridden d"; + private $e = "Overridden e"; + + static function doForEach($obj) { + echo "in E::doForEach\n"; + foreach ($obj as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } + + function doForEachOnThis() { + echo "in E::doForEachOnThis\n"; + foreach ($this as $k=>&$v) { + var_dump($v); + $v="changed.$k"; + } + } +} + +echo "\n\nIterate over various generations from within overridden methods:\n"; +echo "\n--> Using instance of C:\n"; +$myC = new C; +$myC->doForEachOnThis(); +var_dump($myC); +echo "\n--> Using instance of D:\n"; +$myD = new D; +$myD->doForEachOnThis(); +var_dump($myD); +echo "\n--> Using instance of E:\n"; +$myE = new E; +$myE->doForEachOnThis(); +var_dump($myE); + +echo "\n\nIterate over various generations from within an inherited method:\n"; +echo "\n--> Using instance of C:\n"; +$myC = new C; +$myC->doForEachC(); +var_dump($myC); +echo "\n--> Using instance of D:\n"; +$myD = new D; +$myD->doForEachC(); +var_dump($myD); +echo "\n--> Using instance of E:\n"; +$myE = new E; +$myE->doForEachC(); +var_dump($myE); + +echo "\n\nIterate over various generations from within an overridden static method:\n"; +echo "\n--> Using instance of C:\n"; +$myC = new C; +C::doForEach($myC); +var_dump($myC); +$myC = new C; +D::doForEach($myC); +var_dump($myC); +$myC = new C; +E::doForEach($myC); +var_dump($myC); +echo "\n--> Using instance of D:\n"; +$myD = new D; +C::doForEach($myD); +var_dump($myD); +$myD = new D; +D::doForEach($myD); +var_dump($myD); +$myD = new D; +E::doForEach($myD); +var_dump($myD); +echo "\n--> Using instance of E:\n"; +$myE = new E; +C::doForEach($myE); +var_dump($myE); +$myE = new E; +D::doForEach($myE); +var_dump($myE); +$myE = new E; +E::doForEach($myE); +var_dump($myE); + + +echo "\n\nIterate over various generations from outside the object:\n"; +echo "\n--> Using instance of C:\n"; +$myC = new C; +foreach ($myC as $k=>&$v) { + var_dump($v); + $v="changed.$k"; +} +var_dump($myC); +echo "\n--> Using instance of D:\n"; +$myD = new D; +foreach ($myD as $k=>&$v) { + var_dump($v); + $v="changed.$k"; +} +var_dump($myD); +echo "\n--> Using instance of E:\n"; +$myE = new E; +foreach ($myE as $k=>&$v) { + var_dump($v); + $v="changed.$k"; +} +var_dump($myE); +?> +===DONE=== +--EXPECTF-- +Iterate over various generations from within overridden methods: + +--> Using instance of C: +in C::doForEachOnThis +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(9) "changed.e" +} + +--> Using instance of D: +in D::doForEachOnThis +string(10) "Original f" +string(10) "Original g" +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +object(D)#%d (7) { + ["f":"D":private]=> + string(9) "changed.f" + ["g":protected]=> + string(9) "changed.g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(10) "Original e" +} + +--> Using instance of E: +in E::doForEachOnThis +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +string(12) "Overridden d" +string(12) "Overridden e" +string(10) "Original g" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"E":private]=> + string(9) "changed.e" + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["e":"C":private]=> + string(10) "Original e" +} + + +Iterate over various generations from within an inherited method: + +--> Using instance of C: +in C::doForEachC +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(9) "changed.e" +} + +--> Using instance of D: +in C::doForEachC +string(10) "Original g" +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(D)#%d (7) { + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(9) "changed.e" +} + +--> Using instance of E: +in C::doForEachC +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +string(12) "Overridden d" +string(10) "Original g" +string(10) "Original e" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"E":private]=> + string(12) "Overridden e" + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["e":"C":private]=> + string(9) "changed.e" +} + + +Iterate over various generations from within an overridden static method: + +--> Using instance of C: +in C::doForEach +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(9) "changed.e" +} +in D::doForEach +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(10) "Original e" +} +in E::doForEach +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(10) "Original e" +} + +--> Using instance of D: +in C::doForEach +string(10) "Original g" +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(D)#%d (7) { + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(9) "changed.e" +} +in D::doForEach +string(10) "Original f" +string(10) "Original g" +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +object(D)#%d (7) { + ["f":"D":private]=> + string(9) "changed.f" + ["g":protected]=> + string(9) "changed.g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(10) "Original e" +} +in E::doForEach +string(10) "Original g" +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +object(D)#%d (7) { + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"C":private]=> + string(10) "Original e" +} + +--> Using instance of E: +in C::doForEach +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +string(12) "Overridden d" +string(10) "Original g" +string(10) "Original e" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"E":private]=> + string(12) "Overridden e" + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["e":"C":private]=> + string(9) "changed.e" +} +in D::doForEach +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +string(12) "Overridden d" +string(10) "Original f" +string(10) "Original g" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"E":private]=> + string(12) "Overridden e" + ["f":"D":private]=> + string(9) "changed.f" + ["g":protected]=> + string(9) "changed.g" + ["e":"C":private]=> + string(10) "Original e" +} +in E::doForEach +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +string(12) "Overridden d" +string(12) "Overridden e" +string(10) "Original g" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(9) "changed.d" + ["e":"E":private]=> + string(9) "changed.e" + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(9) "changed.g" + ["e":"C":private]=> + string(10) "Original e" +} + + +Iterate over various generations from outside the object: + +--> Using instance of C: +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + &string(9) "changed.c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +--> Using instance of D: +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +object(D)#%d (7) { + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(10) "Original g" + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + &string(9) "changed.c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +--> Using instance of E: +string(12) "Overridden a" +string(12) "Overridden b" +string(12) "Overridden c" +object(E)#%d (8) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + &string(9) "changed.c" + ["d":protected]=> + string(12) "Overridden d" + ["e":"E":private]=> + string(12) "Overridden e" + ["f":"D":private]=> + string(10) "Original f" + ["g":protected]=> + string(10) "Original g" + ["e":"C":private]=> + string(10) "Original e" +} +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopObjects.003.phpt b/tests/lang/foreachLoopObjects.003.phpt new file mode 100644 index 0000000..e3747bf --- /dev/null +++ b/tests/lang/foreachLoopObjects.003.phpt @@ -0,0 +1,250 @@ +--TEST-- +Foreach loop tests - modifying the object during the loop. +--FILE-- +$v) { + $obj->$k="changed.$k"; + var_dump($v); +} +var_dump($obj); + +echo "\nModifying the foreach \$value.\n"; +$obj = new C; +foreach ($obj as $k=>$v) { + $v="changed.$k"; +} +var_dump($obj); + + +echo "\nModifying the foreach &\$value.\n"; +$obj = new C; +foreach ($obj as $k=>&$v) { + $v="changed.$k"; +} +var_dump($obj); + +echo "\nAdding properties to an an object.\n"; +$obj = new C; +$counter=0; +foreach ($obj as $v) { + $newPropName = "new$counter"; + $obj->$newPropName = "Added property $counter"; + if ($counter++>10) { + echo "Loop detected\n"; + break; + } + var_dump($v); +} +var_dump($obj); + +echo "\nAdding properties to an an object, using &\$value.\n"; +$obj = new C; +$counter=0; +foreach ($obj as &$v) { + $newPropName = "new$counter"; + $obj->$newPropName = "Added property $counter"; + if ($counter++>10) { + echo "Loop detected\n"; + break; + } + var_dump($v); +} +var_dump($obj); + +echo "\nRemoving properties from an object.\n"; +$obj = new C; +foreach ($obj as $v) { + unset($obj->a); + unset($obj->b); + unset($obj->c); + var_dump($v); +} +var_dump($obj); + +echo "\nRemoving properties from an object, using &\$value.\n"; +$obj = new C; +foreach ($obj as &$v) { + unset($obj->a); + unset($obj->b); + unset($obj->c); + var_dump($v); +} +var_dump($obj); + +?> +===DONE=== +--EXPECTF-- +Directly changing object values. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + string(9) "changed.c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +Modifying the foreach $value. +object(C)#%d (5) { + ["a"]=> + string(10) "Original a" + ["b"]=> + string(10) "Original b" + ["c"]=> + string(10) "Original c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +Modifying the foreach &$value. +object(C)#%d (5) { + ["a"]=> + string(9) "changed.a" + ["b"]=> + string(9) "changed.b" + ["c"]=> + &string(9) "changed.c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +Adding properties to an an object. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(16) "Added property 0" +string(16) "Added property 1" +string(16) "Added property 2" +string(16) "Added property 3" +string(16) "Added property 4" +string(16) "Added property 5" +string(16) "Added property 6" +string(16) "Added property 7" +Loop detected +object(C)#%d (17) { + ["a"]=> + string(10) "Original a" + ["b"]=> + string(10) "Original b" + ["c"]=> + string(10) "Original c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" + ["new0"]=> + string(16) "Added property 0" + ["new1"]=> + string(16) "Added property 1" + ["new2"]=> + string(16) "Added property 2" + ["new3"]=> + string(16) "Added property 3" + ["new4"]=> + string(16) "Added property 4" + ["new5"]=> + string(16) "Added property 5" + ["new6"]=> + string(16) "Added property 6" + ["new7"]=> + string(16) "Added property 7" + ["new8"]=> + string(16) "Added property 8" + ["new9"]=> + string(16) "Added property 9" + ["new10"]=> + string(17) "Added property 10" + ["new11"]=> + string(17) "Added property 11" +} + +Adding properties to an an object, using &$value. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(16) "Added property 0" +string(16) "Added property 1" +string(16) "Added property 2" +string(16) "Added property 3" +string(16) "Added property 4" +string(16) "Added property 5" +string(16) "Added property 6" +string(16) "Added property 7" +Loop detected +object(C)#%d (17) { + ["a"]=> + string(10) "Original a" + ["b"]=> + string(10) "Original b" + ["c"]=> + string(10) "Original c" + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" + ["new0"]=> + string(16) "Added property 0" + ["new1"]=> + string(16) "Added property 1" + ["new2"]=> + string(16) "Added property 2" + ["new3"]=> + string(16) "Added property 3" + ["new4"]=> + string(16) "Added property 4" + ["new5"]=> + string(16) "Added property 5" + ["new6"]=> + string(16) "Added property 6" + ["new7"]=> + string(16) "Added property 7" + ["new8"]=> + &string(16) "Added property 8" + ["new9"]=> + string(16) "Added property 9" + ["new10"]=> + string(17) "Added property 10" + ["new11"]=> + string(17) "Added property 11" +} + +Removing properties from an object. +string(10) "Original a" +object(C)#%d (2) { + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} + +Removing properties from an object, using &$value. +string(10) "Original a" +object(C)#%d (2) { + ["d":protected]=> + string(10) "Original d" + ["e":"C":private]=> + string(10) "Original e" +} +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopObjects.004.phpt b/tests/lang/foreachLoopObjects.004.phpt new file mode 100644 index 0000000..a158ac6 --- /dev/null +++ b/tests/lang/foreachLoopObjects.004.phpt @@ -0,0 +1,55 @@ +--TEST-- +Foreach loop tests - Removing the current element from an iterated object. +--FILE-- +b) { + unset($obj->b); + } + var_dump($v); + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + + +?> +===DONE=== +--EXPECTF-- +Removing the current element from an iterated object. +string(10) "Original a" +string(10) "Original b" + +Notice: Undefined property: C::$b in %s on line %d +string(10) "Original c" + +Notice: Undefined property: C::$b in %s on line %d +string(10) "Original d" + +Notice: Undefined property: C::$b in %s on line %d +string(10) "Original e" +object(C)#%d (4) { + ["a"]=> + string(10) "Original a" + ["c"]=> + string(10) "Original c" + ["d"]=> + string(10) "Original d" + ["e"]=> + string(10) "Original e" +} +===DONE=== \ No newline at end of file diff --git a/tests/lang/foreachLoopObjects.005.phpt b/tests/lang/foreachLoopObjects.005.phpt new file mode 100644 index 0000000..1692bcd --- /dev/null +++ b/tests/lang/foreachLoopObjects.005.phpt @@ -0,0 +1,78 @@ +--TEST-- +Foreach loop tests - removing properties before and after the current property during the loop. +--FILE-- +a) { + unset($obj->c); + } + var_dump($v); + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + +echo "\nRemoving properties before the current element from an iterated object.\n"; +$obj = new C; +foreach ($obj as $v) { + if ($v==$obj->b) { + unset($obj->a); + } + var_dump($v); + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + + +?> +--EXPECTF-- + +Removing properties before the current element from an iterated object. +string(10) "Original a" +string(10) "Original b" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (4) { + ["a"]=> + string(10) "Original a" + ["b"]=> + string(10) "Original b" + ["d"]=> + string(10) "Original d" + ["e"]=> + string(10) "Original e" +} + +Removing properties before the current element from an iterated object. +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (4) { + ["b"]=> + string(10) "Original b" + ["c"]=> + string(10) "Original c" + ["d"]=> + string(10) "Original d" + ["e"]=> + string(10) "Original e" +} diff --git a/tests/lang/foreachLoopObjects.006.phpt b/tests/lang/foreachLoopObjects.006.phpt new file mode 100644 index 0000000..8218b44 --- /dev/null +++ b/tests/lang/foreachLoopObjects.006.phpt @@ -0,0 +1,147 @@ +--TEST-- +Foreach loop tests - substituting the entire iterated entity during the loop. +--FILE-- +a = "new a"; +$obj2->b = "new b"; +$obj2->c = "new c"; +$obj2->d = "new d"; +$obj2->e = "new e"; +$obj2->f = "new f"; +$ref = &$obj; +$count=0; +foreach ($obj as $v) { + var_dump($v); + if ($v==$obj->b) { + $ref=$obj2; + } + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + +echo "\nSubstituting the iterated object for an array.\n"; +$obj = new C; +$a = array(1,2,3,4,5,6,7,8); +$ref = &$obj; +$count=0; +foreach ($obj as $v) { + var_dump($v); + if ($v==="Original b") { + $ref=$a; + } + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + +echo "\nSubstituting the iterated array for an object.\n"; +$a = array(1,2,3,4,5,6,7,8); +$obj = new C; +$ref = &$a; +$count=0; +foreach ($a as $v) { + var_dump($v); + if ($v===2) { + $ref=$obj; + } + if (++$count>10) { + echo "Loop detected.\n"; + break; + } +} +var_dump($obj); + +?> +--EXPECTF-- + +Substituting the iterated object for a different object. +string(10) "Original a" +string(10) "Original b" +string(5) "new a" +string(5) "new b" +string(5) "new c" +string(5) "new d" +string(5) "new e" +string(5) "new f" +object(stdClass)#%d (6) { + ["a"]=> + string(5) "new a" + ["b"]=> + string(5) "new b" + ["c"]=> + string(5) "new c" + ["d"]=> + string(5) "new d" + ["e"]=> + string(5) "new e" + ["f"]=> + string(5) "new f" +} + +Substituting the iterated object for an array. +string(10) "Original a" +string(10) "Original b" +int(1) +int(2) +int(3) +int(4) +int(5) +int(6) +int(7) +int(8) +array(8) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) + [6]=> + int(7) + [7]=> + int(8) +} + +Substituting the iterated array for an object. +int(1) +int(2) +string(10) "Original a" +string(10) "Original b" +string(10) "Original c" +string(10) "Original d" +string(10) "Original e" +object(C)#%d (5) { + ["a"]=> + string(10) "Original a" + ["b"]=> + string(10) "Original b" + ["c"]=> + string(10) "Original c" + ["d"]=> + string(10) "Original d" + ["e"]=> + string(10) "Original e" +} diff --git a/tests/lang/foreach_with_object_001.phpt b/tests/lang/foreach_with_object_001.phpt new file mode 100644 index 0000000..598b844 --- /dev/null +++ b/tests/lang/foreach_with_object_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +foreach() with foreach($o->mthd()->arr) +--FILE-- +c()->a as $value) { + print "$value\n"; +} + +?> +===DONE=== +--EXPECT-- +1 +2 +3 +4 +5 +===DONE=== diff --git a/tests/lang/foreach_with_references_001.phpt b/tests/lang/foreach_with_references_001.phpt new file mode 100644 index 0000000..eb52bb8 --- /dev/null +++ b/tests/lang/foreach_with_references_001.phpt @@ -0,0 +1,32 @@ +--TEST-- +foreach() with references +--FILE-- + "one", 2 => "two", 3 => "three"); + +foreach($arr as $key => $val) { + $val = $key; +} + +print_r($arr); + +foreach($arr as $key => &$val) { + $val = $key; +} + +print_r($arr); + +--EXPECT-- +Array +( + [1] => one + [2] => two + [3] => three +) +Array +( + [1] => 1 + [2] => 2 + [3] => 3 +) diff --git a/tests/lang/func_get_arg.001.phpt b/tests/lang/func_get_arg.001.phpt new file mode 100644 index 0000000..b1bbb18 --- /dev/null +++ b/tests/lang/func_get_arg.001.phpt @@ -0,0 +1,15 @@ +--TEST-- +func_get_arg test +--FILE-- + +--EXPECT-- +2 \ No newline at end of file diff --git a/tests/lang/func_get_arg.002.phpt b/tests/lang/func_get_arg.002.phpt new file mode 100644 index 0000000..6ab4f95 --- /dev/null +++ b/tests/lang/func_get_arg.002.phpt @@ -0,0 +1,19 @@ +--TEST-- +func_get_arg with variable number of args +--FILE-- + +--EXPECT-- +int(3) +int(3) diff --git a/tests/lang/func_get_arg.003.phpt b/tests/lang/func_get_arg.003.phpt new file mode 100644 index 0000000..4ef9967 --- /dev/null +++ b/tests/lang/func_get_arg.003.phpt @@ -0,0 +1,11 @@ +--TEST-- +func_get_arg outside of a function declaration +--FILE-- + +--EXPECTF-- +Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d +bool(false) diff --git a/tests/lang/func_get_arg.004.phpt b/tests/lang/func_get_arg.004.phpt new file mode 100644 index 0000000..6931df0 --- /dev/null +++ b/tests/lang/func_get_arg.004.phpt @@ -0,0 +1,16 @@ +--TEST-- +func_get_arg on non-existent arg +--FILE-- + +--EXPECTF-- +Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d +bool(false) \ No newline at end of file diff --git a/tests/lang/func_get_arg.005.phpt b/tests/lang/func_get_arg.005.phpt new file mode 100644 index 0000000..e1ae78e --- /dev/null +++ b/tests/lang/func_get_arg.005.phpt @@ -0,0 +1,19 @@ +--TEST-- +A variable, which is referenced by another variable, is passed by value. +During the call, the original variable is updated. This should not affect func_get_arg(). +--FILE-- + +--EXPECTF-- +string(10) "original.a" +string(10) "original.a" \ No newline at end of file diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt new file mode 100644 index 0000000..5dd0ed6 --- /dev/null +++ b/tests/lang/func_get_arg_variation.phpt @@ -0,0 +1,28 @@ +--TEST-- +func_get_arg test +--FILE-- + +--EXPECTF-- +Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d + +Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d + +Warning: func_get_arg() expects parameter 1 to be long, string given in %s on line %d + +Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d + +Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d + diff --git a/tests/lang/func_get_args.001.phpt b/tests/lang/func_get_args.001.phpt new file mode 100644 index 0000000..740a0a2 --- /dev/null +++ b/tests/lang/func_get_args.001.phpt @@ -0,0 +1,15 @@ +--TEST-- +func_get_args with no args +--FILE-- + +--EXPECT-- +array(0) { +} \ No newline at end of file diff --git a/tests/lang/func_get_args.002.phpt b/tests/lang/func_get_args.002.phpt new file mode 100644 index 0000000..0a886c2 --- /dev/null +++ b/tests/lang/func_get_args.002.phpt @@ -0,0 +1,22 @@ +--TEST-- +func_get_args with variable number of args +--FILE-- + +--EXPECT-- +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} + diff --git a/tests/lang/func_get_args.003.phpt b/tests/lang/func_get_args.003.phpt new file mode 100644 index 0000000..44faf7e --- /dev/null +++ b/tests/lang/func_get_args.003.phpt @@ -0,0 +1,11 @@ +--TEST-- +func_get_args() outside of a function declaration +--FILE-- + +--EXPECTREGEX-- +Warning\: func_get_args\(\)\: Called from the global scope - no function context in \S* on line 3 +bool\(false\) diff --git a/tests/lang/func_get_args.004.phpt b/tests/lang/func_get_args.004.phpt new file mode 100644 index 0000000..84e3ebe --- /dev/null +++ b/tests/lang/func_get_args.004.phpt @@ -0,0 +1,67 @@ +--TEST-- +Pass same variable by ref and by value. +--FILE-- + +--EXPECTF-- + +-- Val, Ref -- +string(10) "original.a" +string(10) "original.a" +array(2) { + [0]=> + string(10) "original.a" + [1]=> + string(10) "original.a" +} +array(2) { + [0]=> + string(10) "original.a" + [1]=> + string(9) "changed.y" +} +string(9) "changed.y" + + +-- Ref, Val -- +string(10) "original.b" +string(10) "original.b" +array(2) { + [0]=> + string(10) "original.b" + [1]=> + string(10) "original.b" +} +array(2) { + [0]=> + string(9) "changed.x" + [1]=> + string(10) "original.b" +} +string(9) "changed.x" \ No newline at end of file diff --git a/tests/lang/func_num_args.001.phpt b/tests/lang/func_num_args.001.phpt new file mode 100644 index 0000000..c281557 --- /dev/null +++ b/tests/lang/func_num_args.001.phpt @@ -0,0 +1,14 @@ +--TEST-- +func_num_args with no args +--FILE-- + +--EXPECT-- +int(0) \ No newline at end of file diff --git a/tests/lang/func_num_args.002.phpt b/tests/lang/func_num_args.002.phpt new file mode 100644 index 0000000..bfb8f7c --- /dev/null +++ b/tests/lang/func_num_args.002.phpt @@ -0,0 +1,14 @@ +--TEST-- +func_num_args with variable number of args +--FILE-- + +--EXPECT-- +int(3) \ No newline at end of file diff --git a/tests/lang/func_num_args.003.phpt b/tests/lang/func_num_args.003.phpt new file mode 100644 index 0000000..7cf1229 --- /dev/null +++ b/tests/lang/func_num_args.003.phpt @@ -0,0 +1,12 @@ +--TEST-- +func_num_args() outside of a function declaration +--FILE-- + +--EXPECTF-- + +Warning: func_num_args(): Called from the global scope - no function context in %s on line %d +int(-1) \ No newline at end of file diff --git a/tests/lang/func_num_args.004.phpt b/tests/lang/func_num_args.004.phpt new file mode 100644 index 0000000..8bdc6f0 --- /dev/null +++ b/tests/lang/func_num_args.004.phpt @@ -0,0 +1,48 @@ +--TEST-- +Pass same variable by ref and by value. +--FILE-- + +--EXPECTF-- + + +-- Val, Ref -- +string(10) "original.a" +string(10) "original.a" +int(2) +int(2) +string(9) "changed.y" + + +-- Ref, Val -- +string(10) "original.b" +string(10) "original.b" +int(2) +int(2) +string(9) "changed.x" diff --git a/tests/lang/inc.inc b/tests/lang/inc.inc new file mode 100644 index 0000000..64b30af --- /dev/null +++ b/tests/lang/inc.inc @@ -0,0 +1,3 @@ + diff --git a/tests/lang/inc_throw.inc b/tests/lang/inc_throw.inc new file mode 100644 index 0000000..1f032f7 --- /dev/null +++ b/tests/lang/inc_throw.inc @@ -0,0 +1,5 @@ + diff --git a/tests/lang/include_files/echo.inc b/tests/lang/include_files/echo.inc new file mode 100644 index 0000000..60714f6 --- /dev/null +++ b/tests/lang/include_files/echo.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/lang/include_files/eval.inc b/tests/lang/include_files/eval.inc new file mode 100644 index 0000000..16da862 --- /dev/null +++ b/tests/lang/include_files/eval.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/lang/include_files/function.inc b/tests/lang/include_files/function.inc new file mode 100644 index 0000000..528f46c --- /dev/null +++ b/tests/lang/include_files/function.inc @@ -0,0 +1,3 @@ + diff --git a/tests/lang/include_variation1.phpt b/tests/lang/include_variation1.phpt new file mode 100644 index 0000000..cf99ba9 --- /dev/null +++ b/tests/lang/include_variation1.phpt @@ -0,0 +1,8 @@ +--TEST-- +include() a file from the current script directory +--FILE-- + +--EXPECT-- +Included! diff --git a/tests/lang/include_variation2.phpt b/tests/lang/include_variation2.phpt new file mode 100644 index 0000000..051ed71 --- /dev/null +++ b/tests/lang/include_variation2.phpt @@ -0,0 +1,9 @@ +--TEST-- +Including a file in the current script directory from an included function +--FILE-- + +--EXPECT-- +Included! diff --git a/tests/lang/include_variation3.phpt b/tests/lang/include_variation3.phpt new file mode 100644 index 0000000..1fa80c5 --- /dev/null +++ b/tests/lang/include_variation3.phpt @@ -0,0 +1,8 @@ +--TEST-- +Including a file in the current script directory from eval'd code +--FILE-- + +--EXPECT-- +Included! \ No newline at end of file diff --git a/tests/lang/operators/add_basiclong_64bit.phpt b/tests/lang/operators/add_basiclong_64bit.phpt new file mode 100644 index 0000000..cae8f4f --- /dev/null +++ b/tests/lang/operators/add_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test + operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 + 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 + 1 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 + -1 --- +int(9223372036854775806) +--- testing: 9223372036854775807 + 7 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 + 9 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 + 65 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 + -44 --- +int(9223372036854775763) +--- testing: 9223372036854775807 + 2147483647 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 + 9223372036854775807 --- +float(1.844674407371E+19) +--- testing: -9223372036854775808 + 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 + 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775808 + -1 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 + 7 --- +int(-9223372036854775801) +--- testing: -9223372036854775808 + 9 --- +int(-9223372036854775799) +--- testing: -9223372036854775808 + 65 --- +int(-9223372036854775743) +--- testing: -9223372036854775808 + -44 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 + 2147483647 --- +int(-9223372034707292161) +--- testing: -9223372036854775808 + 9223372036854775807 --- +int(-1) +--- testing: 2147483647 + 0 --- +int(2147483647) +--- testing: 2147483647 + 1 --- +int(2147483648) +--- testing: 2147483647 + -1 --- +int(2147483646) +--- testing: 2147483647 + 7 --- +int(2147483654) +--- testing: 2147483647 + 9 --- +int(2147483656) +--- testing: 2147483647 + 65 --- +int(2147483712) +--- testing: 2147483647 + -44 --- +int(2147483603) +--- testing: 2147483647 + 2147483647 --- +int(4294967294) +--- testing: 2147483647 + 9223372036854775807 --- +float(9.2233720390023E+18) +--- testing: -2147483648 + 0 --- +int(-2147483648) +--- testing: -2147483648 + 1 --- +int(-2147483647) +--- testing: -2147483648 + -1 --- +int(-2147483649) +--- testing: -2147483648 + 7 --- +int(-2147483641) +--- testing: -2147483648 + 9 --- +int(-2147483639) +--- testing: -2147483648 + 65 --- +int(-2147483583) +--- testing: -2147483648 + -44 --- +int(-2147483692) +--- testing: -2147483648 + 2147483647 --- +int(-1) +--- testing: -2147483648 + 9223372036854775807 --- +int(9223372034707292159) +--- testing: 9223372034707292160 + 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 + 1 --- +int(9223372034707292161) +--- testing: 9223372034707292160 + -1 --- +int(9223372034707292159) +--- testing: 9223372034707292160 + 7 --- +int(9223372034707292167) +--- testing: 9223372034707292160 + 9 --- +int(9223372034707292169) +--- testing: 9223372034707292160 + 65 --- +int(9223372034707292225) +--- testing: 9223372034707292160 + -44 --- +int(9223372034707292116) +--- testing: 9223372034707292160 + 2147483647 --- +int(9223372036854775807) +--- testing: 9223372034707292160 + 9223372036854775807 --- +float(1.8446744071562E+19) +--- testing: -9223372034707292160 + 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 + 1 --- +int(-9223372034707292159) +--- testing: -9223372034707292160 + -1 --- +int(-9223372034707292161) +--- testing: -9223372034707292160 + 7 --- +int(-9223372034707292153) +--- testing: -9223372034707292160 + 9 --- +int(-9223372034707292151) +--- testing: -9223372034707292160 + 65 --- +int(-9223372034707292095) +--- testing: -9223372034707292160 + -44 --- +int(-9223372034707292204) +--- testing: -9223372034707292160 + 2147483647 --- +int(-9223372032559808513) +--- testing: -9223372034707292160 + 9223372036854775807 --- +int(2147483647) +--- testing: 2147483648 + 0 --- +int(2147483648) +--- testing: 2147483648 + 1 --- +int(2147483649) +--- testing: 2147483648 + -1 --- +int(2147483647) +--- testing: 2147483648 + 7 --- +int(2147483655) +--- testing: 2147483648 + 9 --- +int(2147483657) +--- testing: 2147483648 + 65 --- +int(2147483713) +--- testing: 2147483648 + -44 --- +int(2147483604) +--- testing: 2147483648 + 2147483647 --- +int(4294967295) +--- testing: 2147483648 + 9223372036854775807 --- +float(9.2233720390023E+18) +--- testing: -2147483649 + 0 --- +int(-2147483649) +--- testing: -2147483649 + 1 --- +int(-2147483648) +--- testing: -2147483649 + -1 --- +int(-2147483650) +--- testing: -2147483649 + 7 --- +int(-2147483642) +--- testing: -2147483649 + 9 --- +int(-2147483640) +--- testing: -2147483649 + 65 --- +int(-2147483584) +--- testing: -2147483649 + -44 --- +int(-2147483693) +--- testing: -2147483649 + 2147483647 --- +int(-2) +--- testing: -2147483649 + 9223372036854775807 --- +int(9223372034707292158) +--- testing: 4294967294 + 0 --- +int(4294967294) +--- testing: 4294967294 + 1 --- +int(4294967295) +--- testing: 4294967294 + -1 --- +int(4294967293) +--- testing: 4294967294 + 7 --- +int(4294967301) +--- testing: 4294967294 + 9 --- +int(4294967303) +--- testing: 4294967294 + 65 --- +int(4294967359) +--- testing: 4294967294 + -44 --- +int(4294967250) +--- testing: 4294967294 + 2147483647 --- +int(6442450941) +--- testing: 4294967294 + 9223372036854775807 --- +float(9.2233720411497E+18) +--- testing: 4294967295 + 0 --- +int(4294967295) +--- testing: 4294967295 + 1 --- +int(4294967296) +--- testing: 4294967295 + -1 --- +int(4294967294) +--- testing: 4294967295 + 7 --- +int(4294967302) +--- testing: 4294967295 + 9 --- +int(4294967304) +--- testing: 4294967295 + 65 --- +int(4294967360) +--- testing: 4294967295 + -44 --- +int(4294967251) +--- testing: 4294967295 + 2147483647 --- +int(6442450942) +--- testing: 4294967295 + 9223372036854775807 --- +float(9.2233720411497E+18) +--- testing: 4294967293 + 0 --- +int(4294967293) +--- testing: 4294967293 + 1 --- +int(4294967294) +--- testing: 4294967293 + -1 --- +int(4294967292) +--- testing: 4294967293 + 7 --- +int(4294967300) +--- testing: 4294967293 + 9 --- +int(4294967302) +--- testing: 4294967293 + 65 --- +int(4294967358) +--- testing: 4294967293 + -44 --- +int(4294967249) +--- testing: 4294967293 + 2147483647 --- +int(6442450940) +--- testing: 4294967293 + 9223372036854775807 --- +float(9.2233720411497E+18) +--- testing: 9223372036854775806 + 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 + 1 --- +int(9223372036854775807) +--- testing: 9223372036854775806 + -1 --- +int(9223372036854775805) +--- testing: 9223372036854775806 + 7 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775806 + 9 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775806 + 65 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775806 + -44 --- +int(9223372036854775762) +--- testing: 9223372036854775806 + 2147483647 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775806 + 9223372036854775807 --- +float(1.844674407371E+19) +--- testing: 9.2233720368548E+18 + 0 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + 1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + -1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + 7 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + 9 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + 65 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + -44 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 + 2147483647 --- +float(9.2233720390023E+18) +--- testing: 9.2233720368548E+18 + 9223372036854775807 --- +float(1.844674407371E+19) +--- testing: -9223372036854775807 + 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 + 1 --- +int(-9223372036854775806) +--- testing: -9223372036854775807 + -1 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 + 7 --- +int(-9223372036854775800) +--- testing: -9223372036854775807 + 9 --- +int(-9223372036854775798) +--- testing: -9223372036854775807 + 65 --- +int(-9223372036854775742) +--- testing: -9223372036854775807 + -44 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775807 + 2147483647 --- +int(-9223372034707292160) +--- testing: -9223372036854775807 + 9223372036854775807 --- +int(0) +--- testing: -9.2233720368548E+18 + 0 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + 1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + -1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + 7 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + 9 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + 65 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + -44 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 + 2147483647 --- +float(-9.2233720347073E+18) +--- testing: -9.2233720368548E+18 + 9223372036854775807 --- +float(0) +--- testing: 0 + 9223372036854775807 --- +int(9223372036854775807) +--- testing: 0 + -9223372036854775808 --- +int(-9223372036854775808) +--- testing: 0 + 2147483647 --- +int(2147483647) +--- testing: 0 + -2147483648 --- +int(-2147483648) +--- testing: 0 + 9223372034707292160 --- +int(9223372034707292160) +--- testing: 0 + -9223372034707292160 --- +int(-9223372034707292160) +--- testing: 0 + 2147483648 --- +int(2147483648) +--- testing: 0 + -2147483649 --- +int(-2147483649) +--- testing: 0 + 4294967294 --- +int(4294967294) +--- testing: 0 + 4294967295 --- +int(4294967295) +--- testing: 0 + 4294967293 --- +int(4294967293) +--- testing: 0 + 9223372036854775806 --- +int(9223372036854775806) +--- testing: 0 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 0 + -9223372036854775807 --- +int(-9223372036854775807) +--- testing: 0 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 1 + 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 1 + -9223372036854775808 --- +int(-9223372036854775807) +--- testing: 1 + 2147483647 --- +int(2147483648) +--- testing: 1 + -2147483648 --- +int(-2147483647) +--- testing: 1 + 9223372034707292160 --- +int(9223372034707292161) +--- testing: 1 + -9223372034707292160 --- +int(-9223372034707292159) +--- testing: 1 + 2147483648 --- +int(2147483649) +--- testing: 1 + -2147483649 --- +int(-2147483648) +--- testing: 1 + 4294967294 --- +int(4294967295) +--- testing: 1 + 4294967295 --- +int(4294967296) +--- testing: 1 + 4294967293 --- +int(4294967294) +--- testing: 1 + 9223372036854775806 --- +int(9223372036854775807) +--- testing: 1 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 1 + -9223372036854775807 --- +int(-9223372036854775806) +--- testing: 1 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -1 + 9223372036854775807 --- +int(9223372036854775806) +--- testing: -1 + -9223372036854775808 --- +float(-9.2233720368548E+18) +--- testing: -1 + 2147483647 --- +int(2147483646) +--- testing: -1 + -2147483648 --- +int(-2147483649) +--- testing: -1 + 9223372034707292160 --- +int(9223372034707292159) +--- testing: -1 + -9223372034707292160 --- +int(-9223372034707292161) +--- testing: -1 + 2147483648 --- +int(2147483647) +--- testing: -1 + -2147483649 --- +int(-2147483650) +--- testing: -1 + 4294967294 --- +int(4294967293) +--- testing: -1 + 4294967295 --- +int(4294967294) +--- testing: -1 + 4294967293 --- +int(4294967292) +--- testing: -1 + 9223372036854775806 --- +int(9223372036854775805) +--- testing: -1 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -1 + -9223372036854775807 --- +int(-9223372036854775808) +--- testing: -1 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 7 + 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 7 + -9223372036854775808 --- +int(-9223372036854775801) +--- testing: 7 + 2147483647 --- +int(2147483654) +--- testing: 7 + -2147483648 --- +int(-2147483641) +--- testing: 7 + 9223372034707292160 --- +int(9223372034707292167) +--- testing: 7 + -9223372034707292160 --- +int(-9223372034707292153) +--- testing: 7 + 2147483648 --- +int(2147483655) +--- testing: 7 + -2147483649 --- +int(-2147483642) +--- testing: 7 + 4294967294 --- +int(4294967301) +--- testing: 7 + 4294967295 --- +int(4294967302) +--- testing: 7 + 4294967293 --- +int(4294967300) +--- testing: 7 + 9223372036854775806 --- +float(9.2233720368548E+18) +--- testing: 7 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 7 + -9223372036854775807 --- +int(-9223372036854775800) +--- testing: 7 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 9 + 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 9 + -9223372036854775808 --- +int(-9223372036854775799) +--- testing: 9 + 2147483647 --- +int(2147483656) +--- testing: 9 + -2147483648 --- +int(-2147483639) +--- testing: 9 + 9223372034707292160 --- +int(9223372034707292169) +--- testing: 9 + -9223372034707292160 --- +int(-9223372034707292151) +--- testing: 9 + 2147483648 --- +int(2147483657) +--- testing: 9 + -2147483649 --- +int(-2147483640) +--- testing: 9 + 4294967294 --- +int(4294967303) +--- testing: 9 + 4294967295 --- +int(4294967304) +--- testing: 9 + 4294967293 --- +int(4294967302) +--- testing: 9 + 9223372036854775806 --- +float(9.2233720368548E+18) +--- testing: 9 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 9 + -9223372036854775807 --- +int(-9223372036854775798) +--- testing: 9 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 65 + 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 65 + -9223372036854775808 --- +int(-9223372036854775743) +--- testing: 65 + 2147483647 --- +int(2147483712) +--- testing: 65 + -2147483648 --- +int(-2147483583) +--- testing: 65 + 9223372034707292160 --- +int(9223372034707292225) +--- testing: 65 + -9223372034707292160 --- +int(-9223372034707292095) +--- testing: 65 + 2147483648 --- +int(2147483713) +--- testing: 65 + -2147483649 --- +int(-2147483584) +--- testing: 65 + 4294967294 --- +int(4294967359) +--- testing: 65 + 4294967295 --- +int(4294967360) +--- testing: 65 + 4294967293 --- +int(4294967358) +--- testing: 65 + 9223372036854775806 --- +float(9.2233720368548E+18) +--- testing: 65 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 65 + -9223372036854775807 --- +int(-9223372036854775742) +--- testing: 65 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -44 + 9223372036854775807 --- +int(9223372036854775763) +--- testing: -44 + -9223372036854775808 --- +float(-9.2233720368548E+18) +--- testing: -44 + 2147483647 --- +int(2147483603) +--- testing: -44 + -2147483648 --- +int(-2147483692) +--- testing: -44 + 9223372034707292160 --- +int(9223372034707292116) +--- testing: -44 + -9223372034707292160 --- +int(-9223372034707292204) +--- testing: -44 + 2147483648 --- +int(2147483604) +--- testing: -44 + -2147483649 --- +int(-2147483693) +--- testing: -44 + 4294967294 --- +int(4294967250) +--- testing: -44 + 4294967295 --- +int(4294967251) +--- testing: -44 + 4294967293 --- +int(4294967249) +--- testing: -44 + 9223372036854775806 --- +int(9223372036854775762) +--- testing: -44 + 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -44 + -9223372036854775807 --- +float(-9.2233720368548E+18) +--- testing: -44 + -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 2147483647 + 9223372036854775807 --- +float(9.2233720390023E+18) +--- testing: 2147483647 + -9223372036854775808 --- +int(-9223372034707292161) +--- testing: 2147483647 + 2147483647 --- +int(4294967294) +--- testing: 2147483647 + -2147483648 --- +int(-1) +--- testing: 2147483647 + 9223372034707292160 --- +int(9223372036854775807) +--- testing: 2147483647 + -9223372034707292160 --- +int(-9223372032559808513) +--- testing: 2147483647 + 2147483648 --- +int(4294967295) +--- testing: 2147483647 + -2147483649 --- +int(-2) +--- testing: 2147483647 + 4294967294 --- +int(6442450941) +--- testing: 2147483647 + 4294967295 --- +int(6442450942) +--- testing: 2147483647 + 4294967293 --- +int(6442450940) +--- testing: 2147483647 + 9223372036854775806 --- +float(9.2233720390023E+18) +--- testing: 2147483647 + 9.2233720368548E+18 --- +float(9.2233720390023E+18) +--- testing: 2147483647 + -9223372036854775807 --- +int(-9223372034707292160) +--- testing: 2147483647 + -9.2233720368548E+18 --- +float(-9.2233720347073E+18) +--- testing: 9223372036854775807 + 9223372036854775807 --- +float(1.844674407371E+19) +--- testing: 9223372036854775807 + -9223372036854775808 --- +int(-1) +--- testing: 9223372036854775807 + 2147483647 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 + -2147483648 --- +int(9223372034707292159) +--- testing: 9223372036854775807 + 9223372034707292160 --- +float(1.8446744071562E+19) +--- testing: 9223372036854775807 + -9223372034707292160 --- +int(2147483647) +--- testing: 9223372036854775807 + 2147483648 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 + -2147483649 --- +int(9223372034707292158) +--- testing: 9223372036854775807 + 4294967294 --- +float(9.2233720411497E+18) +--- testing: 9223372036854775807 + 4294967295 --- +float(9.2233720411497E+18) +--- testing: 9223372036854775807 + 4294967293 --- +float(9.2233720411497E+18) +--- testing: 9223372036854775807 + 9223372036854775806 --- +float(1.844674407371E+19) +--- testing: 9223372036854775807 + 9.2233720368548E+18 --- +float(1.844674407371E+19) +--- testing: 9223372036854775807 + -9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 + -9.2233720368548E+18 --- +float(0) +===DONE=== diff --git a/tests/lang/operators/add_variationStr.phpt b/tests/lang/operators/add_variationStr.phpt new file mode 100644 index 0000000..264c5c1 --- /dev/null +++ b/tests/lang/operators/add_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test + operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' + '0' --- +int(0) +--- testing: '0' + '65' --- +int(65) +--- testing: '0' + '-44' --- +int(-44) +--- testing: '0' + '1.2' --- +float(1.2) +--- testing: '0' + '-7.7' --- +float(-7.7) +--- testing: '0' + 'abc' --- +int(0) +--- testing: '0' + '123abc' --- +int(123) +--- testing: '0' + '123e5' --- +float(12300000) +--- testing: '0' + '123e5xyz' --- +float(12300000) +--- testing: '0' + ' 123abc' --- +int(123) +--- testing: '0' + '123 abc' --- +int(123) +--- testing: '0' + '123abc ' --- +int(123) +--- testing: '0' + '3.4a' --- +float(3.4) +--- testing: '0' + 'a5.9' --- +int(0) +--- testing: '65' + '0' --- +int(65) +--- testing: '65' + '65' --- +int(130) +--- testing: '65' + '-44' --- +int(21) +--- testing: '65' + '1.2' --- +float(66.2) +--- testing: '65' + '-7.7' --- +float(57.3) +--- testing: '65' + 'abc' --- +int(65) +--- testing: '65' + '123abc' --- +int(188) +--- testing: '65' + '123e5' --- +float(12300065) +--- testing: '65' + '123e5xyz' --- +float(12300065) +--- testing: '65' + ' 123abc' --- +int(188) +--- testing: '65' + '123 abc' --- +int(188) +--- testing: '65' + '123abc ' --- +int(188) +--- testing: '65' + '3.4a' --- +float(68.4) +--- testing: '65' + 'a5.9' --- +int(65) +--- testing: '-44' + '0' --- +int(-44) +--- testing: '-44' + '65' --- +int(21) +--- testing: '-44' + '-44' --- +int(-88) +--- testing: '-44' + '1.2' --- +float(-42.8) +--- testing: '-44' + '-7.7' --- +float(-51.7) +--- testing: '-44' + 'abc' --- +int(-44) +--- testing: '-44' + '123abc' --- +int(79) +--- testing: '-44' + '123e5' --- +float(12299956) +--- testing: '-44' + '123e5xyz' --- +float(12299956) +--- testing: '-44' + ' 123abc' --- +int(79) +--- testing: '-44' + '123 abc' --- +int(79) +--- testing: '-44' + '123abc ' --- +int(79) +--- testing: '-44' + '3.4a' --- +float(-40.6) +--- testing: '-44' + 'a5.9' --- +int(-44) +--- testing: '1.2' + '0' --- +float(1.2) +--- testing: '1.2' + '65' --- +float(66.2) +--- testing: '1.2' + '-44' --- +float(-42.8) +--- testing: '1.2' + '1.2' --- +float(2.4) +--- testing: '1.2' + '-7.7' --- +float(-6.5) +--- testing: '1.2' + 'abc' --- +float(1.2) +--- testing: '1.2' + '123abc' --- +float(124.2) +--- testing: '1.2' + '123e5' --- +float(12300001.2) +--- testing: '1.2' + '123e5xyz' --- +float(12300001.2) +--- testing: '1.2' + ' 123abc' --- +float(124.2) +--- testing: '1.2' + '123 abc' --- +float(124.2) +--- testing: '1.2' + '123abc ' --- +float(124.2) +--- testing: '1.2' + '3.4a' --- +float(4.6) +--- testing: '1.2' + 'a5.9' --- +float(1.2) +--- testing: '-7.7' + '0' --- +float(-7.7) +--- testing: '-7.7' + '65' --- +float(57.3) +--- testing: '-7.7' + '-44' --- +float(-51.7) +--- testing: '-7.7' + '1.2' --- +float(-6.5) +--- testing: '-7.7' + '-7.7' --- +float(-15.4) +--- testing: '-7.7' + 'abc' --- +float(-7.7) +--- testing: '-7.7' + '123abc' --- +float(115.3) +--- testing: '-7.7' + '123e5' --- +float(12299992.3) +--- testing: '-7.7' + '123e5xyz' --- +float(12299992.3) +--- testing: '-7.7' + ' 123abc' --- +float(115.3) +--- testing: '-7.7' + '123 abc' --- +float(115.3) +--- testing: '-7.7' + '123abc ' --- +float(115.3) +--- testing: '-7.7' + '3.4a' --- +float(-4.3) +--- testing: '-7.7' + 'a5.9' --- +float(-7.7) +--- testing: 'abc' + '0' --- +int(0) +--- testing: 'abc' + '65' --- +int(65) +--- testing: 'abc' + '-44' --- +int(-44) +--- testing: 'abc' + '1.2' --- +float(1.2) +--- testing: 'abc' + '-7.7' --- +float(-7.7) +--- testing: 'abc' + 'abc' --- +int(0) +--- testing: 'abc' + '123abc' --- +int(123) +--- testing: 'abc' + '123e5' --- +float(12300000) +--- testing: 'abc' + '123e5xyz' --- +float(12300000) +--- testing: 'abc' + ' 123abc' --- +int(123) +--- testing: 'abc' + '123 abc' --- +int(123) +--- testing: 'abc' + '123abc ' --- +int(123) +--- testing: 'abc' + '3.4a' --- +float(3.4) +--- testing: 'abc' + 'a5.9' --- +int(0) +--- testing: '123abc' + '0' --- +int(123) +--- testing: '123abc' + '65' --- +int(188) +--- testing: '123abc' + '-44' --- +int(79) +--- testing: '123abc' + '1.2' --- +float(124.2) +--- testing: '123abc' + '-7.7' --- +float(115.3) +--- testing: '123abc' + 'abc' --- +int(123) +--- testing: '123abc' + '123abc' --- +int(246) +--- testing: '123abc' + '123e5' --- +float(12300123) +--- testing: '123abc' + '123e5xyz' --- +float(12300123) +--- testing: '123abc' + ' 123abc' --- +int(246) +--- testing: '123abc' + '123 abc' --- +int(246) +--- testing: '123abc' + '123abc ' --- +int(246) +--- testing: '123abc' + '3.4a' --- +float(126.4) +--- testing: '123abc' + 'a5.9' --- +int(123) +--- testing: '123e5' + '0' --- +float(12300000) +--- testing: '123e5' + '65' --- +float(12300065) +--- testing: '123e5' + '-44' --- +float(12299956) +--- testing: '123e5' + '1.2' --- +float(12300001.2) +--- testing: '123e5' + '-7.7' --- +float(12299992.3) +--- testing: '123e5' + 'abc' --- +float(12300000) +--- testing: '123e5' + '123abc' --- +float(12300123) +--- testing: '123e5' + '123e5' --- +float(24600000) +--- testing: '123e5' + '123e5xyz' --- +float(24600000) +--- testing: '123e5' + ' 123abc' --- +float(12300123) +--- testing: '123e5' + '123 abc' --- +float(12300123) +--- testing: '123e5' + '123abc ' --- +float(12300123) +--- testing: '123e5' + '3.4a' --- +float(12300003.4) +--- testing: '123e5' + 'a5.9' --- +float(12300000) +--- testing: '123e5xyz' + '0' --- +float(12300000) +--- testing: '123e5xyz' + '65' --- +float(12300065) +--- testing: '123e5xyz' + '-44' --- +float(12299956) +--- testing: '123e5xyz' + '1.2' --- +float(12300001.2) +--- testing: '123e5xyz' + '-7.7' --- +float(12299992.3) +--- testing: '123e5xyz' + 'abc' --- +float(12300000) +--- testing: '123e5xyz' + '123abc' --- +float(12300123) +--- testing: '123e5xyz' + '123e5' --- +float(24600000) +--- testing: '123e5xyz' + '123e5xyz' --- +float(24600000) +--- testing: '123e5xyz' + ' 123abc' --- +float(12300123) +--- testing: '123e5xyz' + '123 abc' --- +float(12300123) +--- testing: '123e5xyz' + '123abc ' --- +float(12300123) +--- testing: '123e5xyz' + '3.4a' --- +float(12300003.4) +--- testing: '123e5xyz' + 'a5.9' --- +float(12300000) +--- testing: ' 123abc' + '0' --- +int(123) +--- testing: ' 123abc' + '65' --- +int(188) +--- testing: ' 123abc' + '-44' --- +int(79) +--- testing: ' 123abc' + '1.2' --- +float(124.2) +--- testing: ' 123abc' + '-7.7' --- +float(115.3) +--- testing: ' 123abc' + 'abc' --- +int(123) +--- testing: ' 123abc' + '123abc' --- +int(246) +--- testing: ' 123abc' + '123e5' --- +float(12300123) +--- testing: ' 123abc' + '123e5xyz' --- +float(12300123) +--- testing: ' 123abc' + ' 123abc' --- +int(246) +--- testing: ' 123abc' + '123 abc' --- +int(246) +--- testing: ' 123abc' + '123abc ' --- +int(246) +--- testing: ' 123abc' + '3.4a' --- +float(126.4) +--- testing: ' 123abc' + 'a5.9' --- +int(123) +--- testing: '123 abc' + '0' --- +int(123) +--- testing: '123 abc' + '65' --- +int(188) +--- testing: '123 abc' + '-44' --- +int(79) +--- testing: '123 abc' + '1.2' --- +float(124.2) +--- testing: '123 abc' + '-7.7' --- +float(115.3) +--- testing: '123 abc' + 'abc' --- +int(123) +--- testing: '123 abc' + '123abc' --- +int(246) +--- testing: '123 abc' + '123e5' --- +float(12300123) +--- testing: '123 abc' + '123e5xyz' --- +float(12300123) +--- testing: '123 abc' + ' 123abc' --- +int(246) +--- testing: '123 abc' + '123 abc' --- +int(246) +--- testing: '123 abc' + '123abc ' --- +int(246) +--- testing: '123 abc' + '3.4a' --- +float(126.4) +--- testing: '123 abc' + 'a5.9' --- +int(123) +--- testing: '123abc ' + '0' --- +int(123) +--- testing: '123abc ' + '65' --- +int(188) +--- testing: '123abc ' + '-44' --- +int(79) +--- testing: '123abc ' + '1.2' --- +float(124.2) +--- testing: '123abc ' + '-7.7' --- +float(115.3) +--- testing: '123abc ' + 'abc' --- +int(123) +--- testing: '123abc ' + '123abc' --- +int(246) +--- testing: '123abc ' + '123e5' --- +float(12300123) +--- testing: '123abc ' + '123e5xyz' --- +float(12300123) +--- testing: '123abc ' + ' 123abc' --- +int(246) +--- testing: '123abc ' + '123 abc' --- +int(246) +--- testing: '123abc ' + '123abc ' --- +int(246) +--- testing: '123abc ' + '3.4a' --- +float(126.4) +--- testing: '123abc ' + 'a5.9' --- +int(123) +--- testing: '3.4a' + '0' --- +float(3.4) +--- testing: '3.4a' + '65' --- +float(68.4) +--- testing: '3.4a' + '-44' --- +float(-40.6) +--- testing: '3.4a' + '1.2' --- +float(4.6) +--- testing: '3.4a' + '-7.7' --- +float(-4.3) +--- testing: '3.4a' + 'abc' --- +float(3.4) +--- testing: '3.4a' + '123abc' --- +float(126.4) +--- testing: '3.4a' + '123e5' --- +float(12300003.4) +--- testing: '3.4a' + '123e5xyz' --- +float(12300003.4) +--- testing: '3.4a' + ' 123abc' --- +float(126.4) +--- testing: '3.4a' + '123 abc' --- +float(126.4) +--- testing: '3.4a' + '123abc ' --- +float(126.4) +--- testing: '3.4a' + '3.4a' --- +float(6.8) +--- testing: '3.4a' + 'a5.9' --- +float(3.4) +--- testing: 'a5.9' + '0' --- +int(0) +--- testing: 'a5.9' + '65' --- +int(65) +--- testing: 'a5.9' + '-44' --- +int(-44) +--- testing: 'a5.9' + '1.2' --- +float(1.2) +--- testing: 'a5.9' + '-7.7' --- +float(-7.7) +--- testing: 'a5.9' + 'abc' --- +int(0) +--- testing: 'a5.9' + '123abc' --- +int(123) +--- testing: 'a5.9' + '123e5' --- +float(12300000) +--- testing: 'a5.9' + '123e5xyz' --- +float(12300000) +--- testing: 'a5.9' + ' 123abc' --- +int(123) +--- testing: 'a5.9' + '123 abc' --- +int(123) +--- testing: 'a5.9' + '123abc ' --- +int(123) +--- testing: 'a5.9' + '3.4a' --- +float(3.4) +--- testing: 'a5.9' + 'a5.9' --- +int(0) +===DONE=== diff --git a/tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt b/tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt new file mode 100644 index 0000000..f463e5d --- /dev/null +++ b/tests/lang/operators/bitwiseAnd_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test & operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 & 0 --- +int(0) +--- testing: 9223372036854775807 & 1 --- +int(1) +--- testing: 9223372036854775807 & -1 --- +int(9223372036854775807) +--- testing: 9223372036854775807 & 7 --- +int(7) +--- testing: 9223372036854775807 & 9 --- +int(9) +--- testing: 9223372036854775807 & 65 --- +int(65) +--- testing: 9223372036854775807 & -44 --- +int(9223372036854775764) +--- testing: 9223372036854775807 & 2147483647 --- +int(2147483647) +--- testing: 9223372036854775807 & 9223372036854775807 --- +int(9223372036854775807) +--- testing: -9223372036854775808 & 0 --- +int(0) +--- testing: -9223372036854775808 & 1 --- +int(0) +--- testing: -9223372036854775808 & -1 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 & 7 --- +int(0) +--- testing: -9223372036854775808 & 9 --- +int(0) +--- testing: -9223372036854775808 & 65 --- +int(0) +--- testing: -9223372036854775808 & -44 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 & 2147483647 --- +int(0) +--- testing: -9223372036854775808 & 9223372036854775807 --- +int(0) +--- testing: 2147483647 & 0 --- +int(0) +--- testing: 2147483647 & 1 --- +int(1) +--- testing: 2147483647 & -1 --- +int(2147483647) +--- testing: 2147483647 & 7 --- +int(7) +--- testing: 2147483647 & 9 --- +int(9) +--- testing: 2147483647 & 65 --- +int(65) +--- testing: 2147483647 & -44 --- +int(2147483604) +--- testing: 2147483647 & 2147483647 --- +int(2147483647) +--- testing: 2147483647 & 9223372036854775807 --- +int(2147483647) +--- testing: -2147483648 & 0 --- +int(0) +--- testing: -2147483648 & 1 --- +int(0) +--- testing: -2147483648 & -1 --- +int(-2147483648) +--- testing: -2147483648 & 7 --- +int(0) +--- testing: -2147483648 & 9 --- +int(0) +--- testing: -2147483648 & 65 --- +int(0) +--- testing: -2147483648 & -44 --- +int(-2147483648) +--- testing: -2147483648 & 2147483647 --- +int(0) +--- testing: -2147483648 & 9223372036854775807 --- +int(9223372034707292160) +--- testing: 9223372034707292160 & 0 --- +int(0) +--- testing: 9223372034707292160 & 1 --- +int(0) +--- testing: 9223372034707292160 & -1 --- +int(9223372034707292160) +--- testing: 9223372034707292160 & 7 --- +int(0) +--- testing: 9223372034707292160 & 9 --- +int(0) +--- testing: 9223372034707292160 & 65 --- +int(0) +--- testing: 9223372034707292160 & -44 --- +int(9223372034707292160) +--- testing: 9223372034707292160 & 2147483647 --- +int(0) +--- testing: 9223372034707292160 & 9223372036854775807 --- +int(9223372034707292160) +--- testing: -9223372034707292160 & 0 --- +int(0) +--- testing: -9223372034707292160 & 1 --- +int(0) +--- testing: -9223372034707292160 & -1 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 & 7 --- +int(0) +--- testing: -9223372034707292160 & 9 --- +int(0) +--- testing: -9223372034707292160 & 65 --- +int(0) +--- testing: -9223372034707292160 & -44 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 & 2147483647 --- +int(0) +--- testing: -9223372034707292160 & 9223372036854775807 --- +int(2147483648) +--- testing: 2147483648 & 0 --- +int(0) +--- testing: 2147483648 & 1 --- +int(0) +--- testing: 2147483648 & -1 --- +int(2147483648) +--- testing: 2147483648 & 7 --- +int(0) +--- testing: 2147483648 & 9 --- +int(0) +--- testing: 2147483648 & 65 --- +int(0) +--- testing: 2147483648 & -44 --- +int(2147483648) +--- testing: 2147483648 & 2147483647 --- +int(0) +--- testing: 2147483648 & 9223372036854775807 --- +int(2147483648) +--- testing: -2147483649 & 0 --- +int(0) +--- testing: -2147483649 & 1 --- +int(1) +--- testing: -2147483649 & -1 --- +int(-2147483649) +--- testing: -2147483649 & 7 --- +int(7) +--- testing: -2147483649 & 9 --- +int(9) +--- testing: -2147483649 & 65 --- +int(65) +--- testing: -2147483649 & -44 --- +int(-2147483692) +--- testing: -2147483649 & 2147483647 --- +int(2147483647) +--- testing: -2147483649 & 9223372036854775807 --- +int(9223372034707292159) +--- testing: 4294967294 & 0 --- +int(0) +--- testing: 4294967294 & 1 --- +int(0) +--- testing: 4294967294 & -1 --- +int(4294967294) +--- testing: 4294967294 & 7 --- +int(6) +--- testing: 4294967294 & 9 --- +int(8) +--- testing: 4294967294 & 65 --- +int(64) +--- testing: 4294967294 & -44 --- +int(4294967252) +--- testing: 4294967294 & 2147483647 --- +int(2147483646) +--- testing: 4294967294 & 9223372036854775807 --- +int(4294967294) +--- testing: 4294967295 & 0 --- +int(0) +--- testing: 4294967295 & 1 --- +int(1) +--- testing: 4294967295 & -1 --- +int(4294967295) +--- testing: 4294967295 & 7 --- +int(7) +--- testing: 4294967295 & 9 --- +int(9) +--- testing: 4294967295 & 65 --- +int(65) +--- testing: 4294967295 & -44 --- +int(4294967252) +--- testing: 4294967295 & 2147483647 --- +int(2147483647) +--- testing: 4294967295 & 9223372036854775807 --- +int(4294967295) +--- testing: 4294967293 & 0 --- +int(0) +--- testing: 4294967293 & 1 --- +int(1) +--- testing: 4294967293 & -1 --- +int(4294967293) +--- testing: 4294967293 & 7 --- +int(5) +--- testing: 4294967293 & 9 --- +int(9) +--- testing: 4294967293 & 65 --- +int(65) +--- testing: 4294967293 & -44 --- +int(4294967252) +--- testing: 4294967293 & 2147483647 --- +int(2147483645) +--- testing: 4294967293 & 9223372036854775807 --- +int(4294967293) +--- testing: 9223372036854775806 & 0 --- +int(0) +--- testing: 9223372036854775806 & 1 --- +int(0) +--- testing: 9223372036854775806 & -1 --- +int(9223372036854775806) +--- testing: 9223372036854775806 & 7 --- +int(6) +--- testing: 9223372036854775806 & 9 --- +int(8) +--- testing: 9223372036854775806 & 65 --- +int(64) +--- testing: 9223372036854775806 & -44 --- +int(9223372036854775764) +--- testing: 9223372036854775806 & 2147483647 --- +int(2147483646) +--- testing: 9223372036854775806 & 9223372036854775807 --- +int(9223372036854775806) +--- testing: 9.2233720368548E+18 & 0 --- +int(0) +--- testing: 9.2233720368548E+18 & 1 --- +int(0) +--- testing: 9.2233720368548E+18 & -1 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 & 7 --- +int(0) +--- testing: 9.2233720368548E+18 & 9 --- +int(0) +--- testing: 9.2233720368548E+18 & 65 --- +int(0) +--- testing: 9.2233720368548E+18 & -44 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 & 2147483647 --- +int(0) +--- testing: 9.2233720368548E+18 & 9223372036854775807 --- +int(0) +--- testing: -9223372036854775807 & 0 --- +int(0) +--- testing: -9223372036854775807 & 1 --- +int(1) +--- testing: -9223372036854775807 & -1 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 & 7 --- +int(1) +--- testing: -9223372036854775807 & 9 --- +int(1) +--- testing: -9223372036854775807 & 65 --- +int(1) +--- testing: -9223372036854775807 & -44 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 & 2147483647 --- +int(1) +--- testing: -9223372036854775807 & 9223372036854775807 --- +int(1) +--- testing: -9.2233720368548E+18 & 0 --- +int(0) +--- testing: -9.2233720368548E+18 & 1 --- +int(0) +--- testing: -9.2233720368548E+18 & -1 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 & 7 --- +int(0) +--- testing: -9.2233720368548E+18 & 9 --- +int(0) +--- testing: -9.2233720368548E+18 & 65 --- +int(0) +--- testing: -9.2233720368548E+18 & -44 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 & 2147483647 --- +int(0) +--- testing: -9.2233720368548E+18 & 9223372036854775807 --- +int(0) +--- testing: 0 & 9223372036854775807 --- +int(0) +--- testing: 0 & -9223372036854775808 --- +int(0) +--- testing: 0 & 2147483647 --- +int(0) +--- testing: 0 & -2147483648 --- +int(0) +--- testing: 0 & 9223372034707292160 --- +int(0) +--- testing: 0 & -9223372034707292160 --- +int(0) +--- testing: 0 & 2147483648 --- +int(0) +--- testing: 0 & -2147483649 --- +int(0) +--- testing: 0 & 4294967294 --- +int(0) +--- testing: 0 & 4294967295 --- +int(0) +--- testing: 0 & 4294967293 --- +int(0) +--- testing: 0 & 9223372036854775806 --- +int(0) +--- testing: 0 & 9.2233720368548E+18 --- +int(0) +--- testing: 0 & -9223372036854775807 --- +int(0) +--- testing: 0 & -9.2233720368548E+18 --- +int(0) +--- testing: 1 & 9223372036854775807 --- +int(1) +--- testing: 1 & -9223372036854775808 --- +int(0) +--- testing: 1 & 2147483647 --- +int(1) +--- testing: 1 & -2147483648 --- +int(0) +--- testing: 1 & 9223372034707292160 --- +int(0) +--- testing: 1 & -9223372034707292160 --- +int(0) +--- testing: 1 & 2147483648 --- +int(0) +--- testing: 1 & -2147483649 --- +int(1) +--- testing: 1 & 4294967294 --- +int(0) +--- testing: 1 & 4294967295 --- +int(1) +--- testing: 1 & 4294967293 --- +int(1) +--- testing: 1 & 9223372036854775806 --- +int(0) +--- testing: 1 & 9.2233720368548E+18 --- +int(0) +--- testing: 1 & -9223372036854775807 --- +int(1) +--- testing: 1 & -9.2233720368548E+18 --- +int(0) +--- testing: -1 & 9223372036854775807 --- +int(9223372036854775807) +--- testing: -1 & -9223372036854775808 --- +int(-9223372036854775808) +--- testing: -1 & 2147483647 --- +int(2147483647) +--- testing: -1 & -2147483648 --- +int(-2147483648) +--- testing: -1 & 9223372034707292160 --- +int(9223372034707292160) +--- testing: -1 & -9223372034707292160 --- +int(-9223372034707292160) +--- testing: -1 & 2147483648 --- +int(2147483648) +--- testing: -1 & -2147483649 --- +int(-2147483649) +--- testing: -1 & 4294967294 --- +int(4294967294) +--- testing: -1 & 4294967295 --- +int(4294967295) +--- testing: -1 & 4294967293 --- +int(4294967293) +--- testing: -1 & 9223372036854775806 --- +int(9223372036854775806) +--- testing: -1 & 9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: -1 & -9223372036854775807 --- +int(-9223372036854775807) +--- testing: -1 & -9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 7 & 9223372036854775807 --- +int(7) +--- testing: 7 & -9223372036854775808 --- +int(0) +--- testing: 7 & 2147483647 --- +int(7) +--- testing: 7 & -2147483648 --- +int(0) +--- testing: 7 & 9223372034707292160 --- +int(0) +--- testing: 7 & -9223372034707292160 --- +int(0) +--- testing: 7 & 2147483648 --- +int(0) +--- testing: 7 & -2147483649 --- +int(7) +--- testing: 7 & 4294967294 --- +int(6) +--- testing: 7 & 4294967295 --- +int(7) +--- testing: 7 & 4294967293 --- +int(5) +--- testing: 7 & 9223372036854775806 --- +int(6) +--- testing: 7 & 9.2233720368548E+18 --- +int(0) +--- testing: 7 & -9223372036854775807 --- +int(1) +--- testing: 7 & -9.2233720368548E+18 --- +int(0) +--- testing: 9 & 9223372036854775807 --- +int(9) +--- testing: 9 & -9223372036854775808 --- +int(0) +--- testing: 9 & 2147483647 --- +int(9) +--- testing: 9 & -2147483648 --- +int(0) +--- testing: 9 & 9223372034707292160 --- +int(0) +--- testing: 9 & -9223372034707292160 --- +int(0) +--- testing: 9 & 2147483648 --- +int(0) +--- testing: 9 & -2147483649 --- +int(9) +--- testing: 9 & 4294967294 --- +int(8) +--- testing: 9 & 4294967295 --- +int(9) +--- testing: 9 & 4294967293 --- +int(9) +--- testing: 9 & 9223372036854775806 --- +int(8) +--- testing: 9 & 9.2233720368548E+18 --- +int(0) +--- testing: 9 & -9223372036854775807 --- +int(1) +--- testing: 9 & -9.2233720368548E+18 --- +int(0) +--- testing: 65 & 9223372036854775807 --- +int(65) +--- testing: 65 & -9223372036854775808 --- +int(0) +--- testing: 65 & 2147483647 --- +int(65) +--- testing: 65 & -2147483648 --- +int(0) +--- testing: 65 & 9223372034707292160 --- +int(0) +--- testing: 65 & -9223372034707292160 --- +int(0) +--- testing: 65 & 2147483648 --- +int(0) +--- testing: 65 & -2147483649 --- +int(65) +--- testing: 65 & 4294967294 --- +int(64) +--- testing: 65 & 4294967295 --- +int(65) +--- testing: 65 & 4294967293 --- +int(65) +--- testing: 65 & 9223372036854775806 --- +int(64) +--- testing: 65 & 9.2233720368548E+18 --- +int(0) +--- testing: 65 & -9223372036854775807 --- +int(1) +--- testing: 65 & -9.2233720368548E+18 --- +int(0) +--- testing: -44 & 9223372036854775807 --- +int(9223372036854775764) +--- testing: -44 & -9223372036854775808 --- +int(-9223372036854775808) +--- testing: -44 & 2147483647 --- +int(2147483604) +--- testing: -44 & -2147483648 --- +int(-2147483648) +--- testing: -44 & 9223372034707292160 --- +int(9223372034707292160) +--- testing: -44 & -9223372034707292160 --- +int(-9223372034707292160) +--- testing: -44 & 2147483648 --- +int(2147483648) +--- testing: -44 & -2147483649 --- +int(-2147483692) +--- testing: -44 & 4294967294 --- +int(4294967252) +--- testing: -44 & 4294967295 --- +int(4294967252) +--- testing: -44 & 4294967293 --- +int(4294967252) +--- testing: -44 & 9223372036854775806 --- +int(9223372036854775764) +--- testing: -44 & 9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: -44 & -9223372036854775807 --- +int(-9223372036854775808) +--- testing: -44 & -9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 2147483647 & 9223372036854775807 --- +int(2147483647) +--- testing: 2147483647 & -9223372036854775808 --- +int(0) +--- testing: 2147483647 & 2147483647 --- +int(2147483647) +--- testing: 2147483647 & -2147483648 --- +int(0) +--- testing: 2147483647 & 9223372034707292160 --- +int(0) +--- testing: 2147483647 & -9223372034707292160 --- +int(0) +--- testing: 2147483647 & 2147483648 --- +int(0) +--- testing: 2147483647 & -2147483649 --- +int(2147483647) +--- testing: 2147483647 & 4294967294 --- +int(2147483646) +--- testing: 2147483647 & 4294967295 --- +int(2147483647) +--- testing: 2147483647 & 4294967293 --- +int(2147483645) +--- testing: 2147483647 & 9223372036854775806 --- +int(2147483646) +--- testing: 2147483647 & 9.2233720368548E+18 --- +int(0) +--- testing: 2147483647 & -9223372036854775807 --- +int(1) +--- testing: 2147483647 & -9.2233720368548E+18 --- +int(0) +--- testing: 9223372036854775807 & 9223372036854775807 --- +int(9223372036854775807) +--- testing: 9223372036854775807 & -9223372036854775808 --- +int(0) +--- testing: 9223372036854775807 & 2147483647 --- +int(2147483647) +--- testing: 9223372036854775807 & -2147483648 --- +int(9223372034707292160) +--- testing: 9223372036854775807 & 9223372034707292160 --- +int(9223372034707292160) +--- testing: 9223372036854775807 & -9223372034707292160 --- +int(2147483648) +--- testing: 9223372036854775807 & 2147483648 --- +int(2147483648) +--- testing: 9223372036854775807 & -2147483649 --- +int(9223372034707292159) +--- testing: 9223372036854775807 & 4294967294 --- +int(4294967294) +--- testing: 9223372036854775807 & 4294967295 --- +int(4294967295) +--- testing: 9223372036854775807 & 4294967293 --- +int(4294967293) +--- testing: 9223372036854775807 & 9223372036854775806 --- +int(9223372036854775806) +--- testing: 9223372036854775807 & 9.2233720368548E+18 --- +int(0) +--- testing: 9223372036854775807 & -9223372036854775807 --- +int(1) +--- testing: 9223372036854775807 & -9.2233720368548E+18 --- +int(0) +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/bitwiseAnd_variationStr.phpt b/tests/lang/operators/bitwiseAnd_variationStr.phpt new file mode 100644 index 0000000..2602270 --- /dev/null +++ b/tests/lang/operators/bitwiseAnd_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test & operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' & '0' --- +string(2) "30" +--- testing: '0' & '65' --- +string(2) "30" +--- testing: '0' & '-44' --- +string(2) "20" +--- testing: '0' & '1.2' --- +string(2) "30" +--- testing: '0' & '-7.7' --- +string(2) "20" +--- testing: '0' & 'abc' --- +string(2) "20" +--- testing: '0' & '123abc' --- +string(2) "30" +--- testing: '0' & '123e5' --- +string(2) "30" +--- testing: '0' & '123e5xyz' --- +string(2) "30" +--- testing: '0' & ' 123abc' --- +string(2) "20" +--- testing: '0' & '123 abc' --- +string(2) "30" +--- testing: '0' & '123abc ' --- +string(2) "30" +--- testing: '0' & '3.4a' --- +string(2) "30" +--- testing: '0' & 'a5.9' --- +string(2) "20" +--- testing: '65' & '0' --- +string(2) "30" +--- testing: '65' & '65' --- +string(4) "3635" +--- testing: '65' & '-44' --- +string(4) "2434" +--- testing: '65' & '1.2' --- +string(4) "3024" +--- testing: '65' & '-7.7' --- +string(4) "2435" +--- testing: '65' & 'abc' --- +string(4) "2020" +--- testing: '65' & '123abc' --- +string(4) "3030" +--- testing: '65' & '123e5' --- +string(4) "3030" +--- testing: '65' & '123e5xyz' --- +string(4) "3030" +--- testing: '65' & ' 123abc' --- +string(4) "2031" +--- testing: '65' & '123 abc' --- +string(4) "3030" +--- testing: '65' & '123abc ' --- +string(4) "3030" +--- testing: '65' & '3.4a' --- +string(4) "3224" +--- testing: '65' & 'a5.9' --- +string(4) "2035" +--- testing: '-44' & '0' --- +string(2) "20" +--- testing: '-44' & '65' --- +string(4) "2434" +--- testing: '-44' & '-44' --- +string(6) "2d3434" +--- testing: '-44' & '1.2' --- +string(6) "212430" +--- testing: '-44' & '-7.7' --- +string(6) "2d3424" +--- testing: '-44' & 'abc' --- +string(6) "212020" +--- testing: '-44' & '123abc' --- +string(6) "213030" +--- testing: '-44' & '123e5' --- +string(6) "213030" +--- testing: '-44' & '123e5xyz' --- +string(6) "213030" +--- testing: '-44' & ' 123abc' --- +string(6) "203030" +--- testing: '-44' & '123 abc' --- +string(6) "213030" +--- testing: '-44' & '123abc ' --- +string(6) "213030" +--- testing: '-44' & '3.4a' --- +string(6) "212434" +--- testing: '-44' & 'a5.9' --- +string(6) "213424" +--- testing: '1.2' & '0' --- +string(2) "30" +--- testing: '1.2' & '65' --- +string(4) "3024" +--- testing: '1.2' & '-44' --- +string(6) "212430" +--- testing: '1.2' & '1.2' --- +string(6) "312e32" +--- testing: '1.2' & '-7.7' --- +string(6) "212622" +--- testing: '1.2' & 'abc' --- +string(6) "212222" +--- testing: '1.2' & '123abc' --- +string(6) "312232" +--- testing: '1.2' & '123e5' --- +string(6) "312232" +--- testing: '1.2' & '123e5xyz' --- +string(6) "312232" +--- testing: '1.2' & ' 123abc' --- +string(6) "202032" +--- testing: '1.2' & '123 abc' --- +string(6) "312232" +--- testing: '1.2' & '123abc ' --- +string(6) "312232" +--- testing: '1.2' & '3.4a' --- +string(6) "312e30" +--- testing: '1.2' & 'a5.9' --- +string(6) "212422" +--- testing: '-7.7' & '0' --- +string(2) "20" +--- testing: '-7.7' & '65' --- +string(4) "2435" +--- testing: '-7.7' & '-44' --- +string(6) "2d3424" +--- testing: '-7.7' & '1.2' --- +string(6) "212622" +--- testing: '-7.7' & '-7.7' --- +string(8) "2d372e37" +--- testing: '-7.7' & 'abc' --- +string(6) "212222" +--- testing: '-7.7' & '123abc' --- +string(8) "21322221" +--- testing: '-7.7' & '123e5' --- +string(8) "21322225" +--- testing: '-7.7' & '123e5xyz' --- +string(8) "21322225" +--- testing: '-7.7' & ' 123abc' --- +string(8) "20312233" +--- testing: '-7.7' & '123 abc' --- +string(8) "21322220" +--- testing: '-7.7' & '123abc ' --- +string(8) "21322221" +--- testing: '-7.7' & '3.4a' --- +string(8) "21262421" +--- testing: '-7.7' & 'a5.9' --- +string(8) "21352e31" +--- testing: 'abc' & '0' --- +string(2) "20" +--- testing: 'abc' & '65' --- +string(4) "2020" +--- testing: 'abc' & '-44' --- +string(6) "212020" +--- testing: 'abc' & '1.2' --- +string(6) "212222" +--- testing: 'abc' & '-7.7' --- +string(6) "212222" +--- testing: 'abc' & 'abc' --- +string(6) "616263" +--- testing: 'abc' & '123abc' --- +string(6) "212223" +--- testing: 'abc' & '123e5' --- +string(6) "212223" +--- testing: 'abc' & '123e5xyz' --- +string(6) "212223" +--- testing: 'abc' & ' 123abc' --- +string(6) "202022" +--- testing: 'abc' & '123 abc' --- +string(6) "212223" +--- testing: 'abc' & '123abc ' --- +string(6) "212223" +--- testing: 'abc' & '3.4a' --- +string(6) "212220" +--- testing: 'abc' & 'a5.9' --- +string(6) "612022" +--- testing: '123abc' & '0' --- +string(2) "30" +--- testing: '123abc' & '65' --- +string(4) "3030" +--- testing: '123abc' & '-44' --- +string(6) "213030" +--- testing: '123abc' & '1.2' --- +string(6) "312232" +--- testing: '123abc' & '-7.7' --- +string(8) "21322221" +--- testing: '123abc' & 'abc' --- +string(6) "212223" +--- testing: '123abc' & '123abc' --- +string(12) "313233616263" +--- testing: '123abc' & '123e5' --- +string(10) "3132336120" +--- testing: '123abc' & '123e5xyz' --- +string(12) "313233612060" +--- testing: '123abc' & ' 123abc' --- +string(12) "203032216062" +--- testing: '123abc' & '123 abc' --- +string(12) "313233206062" +--- testing: '123abc' & '123abc ' --- +string(12) "313233616263" +--- testing: '123abc' & '3.4a' --- +string(8) "31223061" +--- testing: '123abc' & 'a5.9' --- +string(8) "21302221" +--- testing: '123e5' & '0' --- +string(2) "30" +--- testing: '123e5' & '65' --- +string(4) "3030" +--- testing: '123e5' & '-44' --- +string(6) "213030" +--- testing: '123e5' & '1.2' --- +string(6) "312232" +--- testing: '123e5' & '-7.7' --- +string(8) "21322225" +--- testing: '123e5' & 'abc' --- +string(6) "212223" +--- testing: '123e5' & '123abc' --- +string(10) "3132336120" +--- testing: '123e5' & '123e5' --- +string(10) "3132336535" +--- testing: '123e5' & '123e5xyz' --- +string(10) "3132336535" +--- testing: '123e5' & ' 123abc' --- +string(10) "2030322121" +--- testing: '123e5' & '123 abc' --- +string(10) "3132332021" +--- testing: '123e5' & '123abc ' --- +string(10) "3132336120" +--- testing: '123e5' & '3.4a' --- +string(8) "31223061" +--- testing: '123e5' & 'a5.9' --- +string(8) "21302221" +--- testing: '123e5xyz' & '0' --- +string(2) "30" +--- testing: '123e5xyz' & '65' --- +string(4) "3030" +--- testing: '123e5xyz' & '-44' --- +string(6) "213030" +--- testing: '123e5xyz' & '1.2' --- +string(6) "312232" +--- testing: '123e5xyz' & '-7.7' --- +string(8) "21322225" +--- testing: '123e5xyz' & 'abc' --- +string(6) "212223" +--- testing: '123e5xyz' & '123abc' --- +string(12) "313233612060" +--- testing: '123e5xyz' & '123e5' --- +string(10) "3132336535" +--- testing: '123e5xyz' & '123e5xyz' --- +string(16) "313233653578797a" +--- testing: '123e5xyz' & ' 123abc' --- +string(14) "20303221216061" +--- testing: '123e5xyz' & '123 abc' --- +string(14) "31323320216061" +--- testing: '123e5xyz' & '123abc ' --- +string(14) "31323361206020" +--- testing: '123e5xyz' & '3.4a' --- +string(8) "31223061" +--- testing: '123e5xyz' & 'a5.9' --- +string(8) "21302221" +--- testing: ' 123abc' & '0' --- +string(2) "20" +--- testing: ' 123abc' & '65' --- +string(4) "2031" +--- testing: ' 123abc' & '-44' --- +string(6) "203030" +--- testing: ' 123abc' & '1.2' --- +string(6) "202032" +--- testing: ' 123abc' & '-7.7' --- +string(8) "20312233" +--- testing: ' 123abc' & 'abc' --- +string(6) "202022" +--- testing: ' 123abc' & '123abc' --- +string(12) "203032216062" +--- testing: ' 123abc' & '123e5' --- +string(10) "2030322121" +--- testing: ' 123abc' & '123e5xyz' --- +string(14) "20303221216061" +--- testing: ' 123abc' & ' 123abc' --- +string(14) "20313233616263" +--- testing: ' 123abc' & '123 abc' --- +string(14) "20303220616263" +--- testing: ' 123abc' & '123abc ' --- +string(14) "20303221606220" +--- testing: ' 123abc' & '3.4a' --- +string(8) "20203021" +--- testing: ' 123abc' & 'a5.9' --- +string(8) "20312231" +--- testing: '123 abc' & '0' --- +string(2) "30" +--- testing: '123 abc' & '65' --- +string(4) "3030" +--- testing: '123 abc' & '-44' --- +string(6) "213030" +--- testing: '123 abc' & '1.2' --- +string(6) "312232" +--- testing: '123 abc' & '-7.7' --- +string(8) "21322220" +--- testing: '123 abc' & 'abc' --- +string(6) "212223" +--- testing: '123 abc' & '123abc' --- +string(12) "313233206062" +--- testing: '123 abc' & '123e5' --- +string(10) "3132332021" +--- testing: '123 abc' & '123e5xyz' --- +string(14) "31323320216061" +--- testing: '123 abc' & ' 123abc' --- +string(14) "20303220616263" +--- testing: '123 abc' & '123 abc' --- +string(14) "31323320616263" +--- testing: '123 abc' & '123abc ' --- +string(14) "31323320606220" +--- testing: '123 abc' & '3.4a' --- +string(8) "31223020" +--- testing: '123 abc' & 'a5.9' --- +string(8) "21302220" +--- testing: '123abc ' & '0' --- +string(2) "30" +--- testing: '123abc ' & '65' --- +string(4) "3030" +--- testing: '123abc ' & '-44' --- +string(6) "213030" +--- testing: '123abc ' & '1.2' --- +string(6) "312232" +--- testing: '123abc ' & '-7.7' --- +string(8) "21322221" +--- testing: '123abc ' & 'abc' --- +string(6) "212223" +--- testing: '123abc ' & '123abc' --- +string(12) "313233616263" +--- testing: '123abc ' & '123e5' --- +string(10) "3132336120" +--- testing: '123abc ' & '123e5xyz' --- +string(14) "31323361206020" +--- testing: '123abc ' & ' 123abc' --- +string(14) "20303221606220" +--- testing: '123abc ' & '123 abc' --- +string(14) "31323320606220" +--- testing: '123abc ' & '123abc ' --- +string(14) "31323361626320" +--- testing: '123abc ' & '3.4a' --- +string(8) "31223061" +--- testing: '123abc ' & 'a5.9' --- +string(8) "21302221" +--- testing: '3.4a' & '0' --- +string(2) "30" +--- testing: '3.4a' & '65' --- +string(4) "3224" +--- testing: '3.4a' & '-44' --- +string(6) "212434" +--- testing: '3.4a' & '1.2' --- +string(6) "312e30" +--- testing: '3.4a' & '-7.7' --- +string(8) "21262421" +--- testing: '3.4a' & 'abc' --- +string(6) "212220" +--- testing: '3.4a' & '123abc' --- +string(8) "31223061" +--- testing: '3.4a' & '123e5' --- +string(8) "31223061" +--- testing: '3.4a' & '123e5xyz' --- +string(8) "31223061" +--- testing: '3.4a' & ' 123abc' --- +string(8) "20203021" +--- testing: '3.4a' & '123 abc' --- +string(8) "31223020" +--- testing: '3.4a' & '123abc ' --- +string(8) "31223061" +--- testing: '3.4a' & '3.4a' --- +string(8) "332e3461" +--- testing: '3.4a' & 'a5.9' --- +string(8) "21242421" +--- testing: 'a5.9' & '0' --- +string(2) "20" +--- testing: 'a5.9' & '65' --- +string(4) "2035" +--- testing: 'a5.9' & '-44' --- +string(6) "213424" +--- testing: 'a5.9' & '1.2' --- +string(6) "212422" +--- testing: 'a5.9' & '-7.7' --- +string(8) "21352e31" +--- testing: 'a5.9' & 'abc' --- +string(6) "612022" +--- testing: 'a5.9' & '123abc' --- +string(8) "21302221" +--- testing: 'a5.9' & '123e5' --- +string(8) "21302221" +--- testing: 'a5.9' & '123e5xyz' --- +string(8) "21302221" +--- testing: 'a5.9' & ' 123abc' --- +string(8) "20312231" +--- testing: 'a5.9' & '123 abc' --- +string(8) "21302220" +--- testing: 'a5.9' & '123abc ' --- +string(8) "21302221" +--- testing: 'a5.9' & '3.4a' --- +string(8) "21242421" +--- testing: 'a5.9' & 'a5.9' --- +string(8) "61352e39" +===DONE=== diff --git a/tests/lang/operators/bitwiseNot_basiclong_64bit.phpt b/tests/lang/operators/bitwiseNot_basiclong_64bit.phpt new file mode 100644 index 0000000..227b734 --- /dev/null +++ b/tests/lang/operators/bitwiseNot_basiclong_64bit.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test ~N operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 --- +int(9223372036854775807) +--- testing: 2147483647 --- +int(-2147483648) +--- testing: -2147483648 --- +int(2147483647) +--- testing: 9223372034707292160 --- +int(-9223372034707292161) +--- testing: -9223372034707292160 --- +int(9223372034707292159) +--- testing: 2147483648 --- +int(-2147483649) +--- testing: -2147483649 --- +int(2147483648) +--- testing: 4294967294 --- +int(-4294967295) +--- testing: 4294967295 --- +int(-4294967296) +--- testing: 4294967293 --- +int(-4294967294) +--- testing: 9223372036854775806 --- +int(-9223372036854775807) +--- testing: 9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: -9223372036854775807 --- +int(9223372036854775806) +--- testing: -9.2233720368548E+18 --- +int(9223372036854775807) +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/bitwiseNot_variationStr.phpt b/tests/lang/operators/bitwiseNot_variationStr.phpt new file mode 100644 index 0000000..3e7b698 --- /dev/null +++ b/tests/lang/operators/bitwiseNot_variationStr.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test ~N operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +string(2) "cf" +--- testing: '65' --- +string(4) "c9ca" +--- testing: '-44' --- +string(6) "d2cbcb" +--- testing: '1.2' --- +string(6) "ced1cd" +--- testing: '-7.7' --- +string(8) "d2c8d1c8" +--- testing: 'abc' --- +string(6) "9e9d9c" +--- testing: '123abc' --- +string(12) "cecdcc9e9d9c" +--- testing: '123e5' --- +string(10) "cecdcc9aca" +--- testing: '123e5xyz' --- +string(16) "cecdcc9aca878685" +--- testing: ' 123abc' --- +string(14) "dfcecdcc9e9d9c" +--- testing: '123 abc' --- +string(14) "cecdccdf9e9d9c" +--- testing: '123abc ' --- +string(14) "cecdcc9e9d9cdf" +--- testing: '3.4a' --- +string(8) "ccd1cb9e" +--- testing: 'a5.9' --- +string(8) "9ecad1c6" +===DONE=== diff --git a/tests/lang/operators/bitwiseOr_basiclong_64bit.phpt b/tests/lang/operators/bitwiseOr_basiclong_64bit.phpt new file mode 100644 index 0000000..e26d46a --- /dev/null +++ b/tests/lang/operators/bitwiseOr_basiclong_64bit.phpt @@ -0,0 +1,583 @@ +--TEST-- +Test | operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 | 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 1 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -1 --- +int(-1) +--- testing: 9223372036854775807 | 7 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 9 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 65 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -44 --- +int(-1) +--- testing: 9223372036854775807 | 2147483647 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: -9223372036854775808 | 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 | 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775808 | -1 --- +int(-1) +--- testing: -9223372036854775808 | 7 --- +int(-9223372036854775801) +--- testing: -9223372036854775808 | 9 --- +int(-9223372036854775799) +--- testing: -9223372036854775808 | 65 --- +int(-9223372036854775743) +--- testing: -9223372036854775808 | -44 --- +int(-44) +--- testing: -9223372036854775808 | 2147483647 --- +int(-9223372034707292161) +--- testing: -9223372036854775808 | 9223372036854775807 --- +int(-1) +--- testing: 2147483647 | 0 --- +int(2147483647) +--- testing: 2147483647 | 1 --- +int(2147483647) +--- testing: 2147483647 | -1 --- +int(-1) +--- testing: 2147483647 | 7 --- +int(2147483647) +--- testing: 2147483647 | 9 --- +int(2147483647) +--- testing: 2147483647 | 65 --- +int(2147483647) +--- testing: 2147483647 | -44 --- +int(-1) +--- testing: 2147483647 | 2147483647 --- +int(2147483647) +--- testing: 2147483647 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: -2147483648 | 0 --- +int(-2147483648) +--- testing: -2147483648 | 1 --- +int(-2147483647) +--- testing: -2147483648 | -1 --- +int(-1) +--- testing: -2147483648 | 7 --- +int(-2147483641) +--- testing: -2147483648 | 9 --- +int(-2147483639) +--- testing: -2147483648 | 65 --- +int(-2147483583) +--- testing: -2147483648 | -44 --- +int(-44) +--- testing: -2147483648 | 2147483647 --- +int(-1) +--- testing: -2147483648 | 9223372036854775807 --- +int(-1) +--- testing: 9223372034707292160 | 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 | 1 --- +int(9223372034707292161) +--- testing: 9223372034707292160 | -1 --- +int(-1) +--- testing: 9223372034707292160 | 7 --- +int(9223372034707292167) +--- testing: 9223372034707292160 | 9 --- +int(9223372034707292169) +--- testing: 9223372034707292160 | 65 --- +int(9223372034707292225) +--- testing: 9223372034707292160 | -44 --- +int(-44) +--- testing: 9223372034707292160 | 2147483647 --- +int(9223372036854775807) +--- testing: 9223372034707292160 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: -9223372034707292160 | 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 | 1 --- +int(-9223372034707292159) +--- testing: -9223372034707292160 | -1 --- +int(-1) +--- testing: -9223372034707292160 | 7 --- +int(-9223372034707292153) +--- testing: -9223372034707292160 | 9 --- +int(-9223372034707292151) +--- testing: -9223372034707292160 | 65 --- +int(-9223372034707292095) +--- testing: -9223372034707292160 | -44 --- +int(-44) +--- testing: -9223372034707292160 | 2147483647 --- +int(-9223372032559808513) +--- testing: -9223372034707292160 | 9223372036854775807 --- +int(-1) +--- testing: 2147483648 | 0 --- +int(2147483648) +--- testing: 2147483648 | 1 --- +int(2147483649) +--- testing: 2147483648 | -1 --- +int(-1) +--- testing: 2147483648 | 7 --- +int(2147483655) +--- testing: 2147483648 | 9 --- +int(2147483657) +--- testing: 2147483648 | 65 --- +int(2147483713) +--- testing: 2147483648 | -44 --- +int(-44) +--- testing: 2147483648 | 2147483647 --- +int(4294967295) +--- testing: 2147483648 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: -2147483649 | 0 --- +int(-2147483649) +--- testing: -2147483649 | 1 --- +int(-2147483649) +--- testing: -2147483649 | -1 --- +int(-1) +--- testing: -2147483649 | 7 --- +int(-2147483649) +--- testing: -2147483649 | 9 --- +int(-2147483649) +--- testing: -2147483649 | 65 --- +int(-2147483649) +--- testing: -2147483649 | -44 --- +int(-1) +--- testing: -2147483649 | 2147483647 --- +int(-2147483649) +--- testing: -2147483649 | 9223372036854775807 --- +int(-1) +--- testing: 4294967294 | 0 --- +int(4294967294) +--- testing: 4294967294 | 1 --- +int(4294967295) +--- testing: 4294967294 | -1 --- +int(-1) +--- testing: 4294967294 | 7 --- +int(4294967295) +--- testing: 4294967294 | 9 --- +int(4294967295) +--- testing: 4294967294 | 65 --- +int(4294967295) +--- testing: 4294967294 | -44 --- +int(-2) +--- testing: 4294967294 | 2147483647 --- +int(4294967295) +--- testing: 4294967294 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 4294967295 | 0 --- +int(4294967295) +--- testing: 4294967295 | 1 --- +int(4294967295) +--- testing: 4294967295 | -1 --- +int(-1) +--- testing: 4294967295 | 7 --- +int(4294967295) +--- testing: 4294967295 | 9 --- +int(4294967295) +--- testing: 4294967295 | 65 --- +int(4294967295) +--- testing: 4294967295 | -44 --- +int(-1) +--- testing: 4294967295 | 2147483647 --- +int(4294967295) +--- testing: 4294967295 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 4294967293 | 0 --- +int(4294967293) +--- testing: 4294967293 | 1 --- +int(4294967293) +--- testing: 4294967293 | -1 --- +int(-1) +--- testing: 4294967293 | 7 --- +int(4294967295) +--- testing: 4294967293 | 9 --- +int(4294967293) +--- testing: 4294967293 | 65 --- +int(4294967293) +--- testing: 4294967293 | -44 --- +int(-3) +--- testing: 4294967293 | 2147483647 --- +int(4294967295) +--- testing: 4294967293 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 | 1 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | -1 --- +int(-1) +--- testing: 9223372036854775806 | 7 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | 9 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | 65 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | -44 --- +int(-2) +--- testing: 9223372036854775806 | 2147483647 --- +int(9223372036854775807) +--- testing: 9223372036854775806 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 9.2233720368548E+18 | 0 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 | 1 --- +int(-9223372036854775807) +--- testing: 9.2233720368548E+18 | -1 --- +int(-1) +--- testing: 9.2233720368548E+18 | 7 --- +int(-9223372036854775801) +--- testing: 9.2233720368548E+18 | 9 --- +int(-9223372036854775799) +--- testing: 9.2233720368548E+18 | 65 --- +int(-9223372036854775743) +--- testing: 9.2233720368548E+18 | -44 --- +int(-44) +--- testing: 9.2233720368548E+18 | 2147483647 --- +int(-9223372034707292161) +--- testing: 9.2233720368548E+18 | 9223372036854775807 --- +int(-1) +--- testing: -9223372036854775807 | 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 | 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 | -1 --- +int(-1) +--- testing: -9223372036854775807 | 7 --- +int(-9223372036854775801) +--- testing: -9223372036854775807 | 9 --- +int(-9223372036854775799) +--- testing: -9223372036854775807 | 65 --- +int(-9223372036854775743) +--- testing: -9223372036854775807 | -44 --- +int(-43) +--- testing: -9223372036854775807 | 2147483647 --- +int(-9223372034707292161) +--- testing: -9223372036854775807 | 9223372036854775807 --- +int(-1) +--- testing: -9.2233720368548E+18 | 0 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 | 1 --- +int(-9223372036854775807) +--- testing: -9.2233720368548E+18 | -1 --- +int(-1) +--- testing: -9.2233720368548E+18 | 7 --- +int(-9223372036854775801) +--- testing: -9.2233720368548E+18 | 9 --- +int(-9223372036854775799) +--- testing: -9.2233720368548E+18 | 65 --- +int(-9223372036854775743) +--- testing: -9.2233720368548E+18 | -44 --- +int(-44) +--- testing: -9.2233720368548E+18 | 2147483647 --- +int(-9223372034707292161) +--- testing: -9.2233720368548E+18 | 9223372036854775807 --- +int(-1) +--- testing: 0 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 0 | -9223372036854775808 --- +int(-9223372036854775808) +--- testing: 0 | 2147483647 --- +int(2147483647) +--- testing: 0 | -2147483648 --- +int(-2147483648) +--- testing: 0 | 9223372034707292160 --- +int(9223372034707292160) +--- testing: 0 | -9223372034707292160 --- +int(-9223372034707292160) +--- testing: 0 | 2147483648 --- +int(2147483648) +--- testing: 0 | -2147483649 --- +int(-2147483649) +--- testing: 0 | 4294967294 --- +int(4294967294) +--- testing: 0 | 4294967295 --- +int(4294967295) +--- testing: 0 | 4294967293 --- +int(4294967293) +--- testing: 0 | 9223372036854775806 --- +int(9223372036854775806) +--- testing: 0 | 9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 0 | -9223372036854775807 --- +int(-9223372036854775807) +--- testing: 0 | -9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 1 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 1 | -9223372036854775808 --- +int(-9223372036854775807) +--- testing: 1 | 2147483647 --- +int(2147483647) +--- testing: 1 | -2147483648 --- +int(-2147483647) +--- testing: 1 | 9223372034707292160 --- +int(9223372034707292161) +--- testing: 1 | -9223372034707292160 --- +int(-9223372034707292159) +--- testing: 1 | 2147483648 --- +int(2147483649) +--- testing: 1 | -2147483649 --- +int(-2147483649) +--- testing: 1 | 4294967294 --- +int(4294967295) +--- testing: 1 | 4294967295 --- +int(4294967295) +--- testing: 1 | 4294967293 --- +int(4294967293) +--- testing: 1 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 1 | 9.2233720368548E+18 --- +int(-9223372036854775807) +--- testing: 1 | -9223372036854775807 --- +int(-9223372036854775807) +--- testing: 1 | -9.2233720368548E+18 --- +int(-9223372036854775807) +--- testing: -1 | 9223372036854775807 --- +int(-1) +--- testing: -1 | -9223372036854775808 --- +int(-1) +--- testing: -1 | 2147483647 --- +int(-1) +--- testing: -1 | -2147483648 --- +int(-1) +--- testing: -1 | 9223372034707292160 --- +int(-1) +--- testing: -1 | -9223372034707292160 --- +int(-1) +--- testing: -1 | 2147483648 --- +int(-1) +--- testing: -1 | -2147483649 --- +int(-1) +--- testing: -1 | 4294967294 --- +int(-1) +--- testing: -1 | 4294967295 --- +int(-1) +--- testing: -1 | 4294967293 --- +int(-1) +--- testing: -1 | 9223372036854775806 --- +int(-1) +--- testing: -1 | 9.2233720368548E+18 --- +int(-1) +--- testing: -1 | -9223372036854775807 --- +int(-1) +--- testing: -1 | -9.2233720368548E+18 --- +int(-1) +--- testing: 7 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 7 | -9223372036854775808 --- +int(-9223372036854775801) +--- testing: 7 | 2147483647 --- +int(2147483647) +--- testing: 7 | -2147483648 --- +int(-2147483641) +--- testing: 7 | 9223372034707292160 --- +int(9223372034707292167) +--- testing: 7 | -9223372034707292160 --- +int(-9223372034707292153) +--- testing: 7 | 2147483648 --- +int(2147483655) +--- testing: 7 | -2147483649 --- +int(-2147483649) +--- testing: 7 | 4294967294 --- +int(4294967295) +--- testing: 7 | 4294967295 --- +int(4294967295) +--- testing: 7 | 4294967293 --- +int(4294967295) +--- testing: 7 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 7 | 9.2233720368548E+18 --- +int(-9223372036854775801) +--- testing: 7 | -9223372036854775807 --- +int(-9223372036854775801) +--- testing: 7 | -9.2233720368548E+18 --- +int(-9223372036854775801) +--- testing: 9 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 9 | -9223372036854775808 --- +int(-9223372036854775799) +--- testing: 9 | 2147483647 --- +int(2147483647) +--- testing: 9 | -2147483648 --- +int(-2147483639) +--- testing: 9 | 9223372034707292160 --- +int(9223372034707292169) +--- testing: 9 | -9223372034707292160 --- +int(-9223372034707292151) +--- testing: 9 | 2147483648 --- +int(2147483657) +--- testing: 9 | -2147483649 --- +int(-2147483649) +--- testing: 9 | 4294967294 --- +int(4294967295) +--- testing: 9 | 4294967295 --- +int(4294967295) +--- testing: 9 | 4294967293 --- +int(4294967293) +--- testing: 9 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 9 | 9.2233720368548E+18 --- +int(-9223372036854775799) +--- testing: 9 | -9223372036854775807 --- +int(-9223372036854775799) +--- testing: 9 | -9.2233720368548E+18 --- +int(-9223372036854775799) +--- testing: 65 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 65 | -9223372036854775808 --- +int(-9223372036854775743) +--- testing: 65 | 2147483647 --- +int(2147483647) +--- testing: 65 | -2147483648 --- +int(-2147483583) +--- testing: 65 | 9223372034707292160 --- +int(9223372034707292225) +--- testing: 65 | -9223372034707292160 --- +int(-9223372034707292095) +--- testing: 65 | 2147483648 --- +int(2147483713) +--- testing: 65 | -2147483649 --- +int(-2147483649) +--- testing: 65 | 4294967294 --- +int(4294967295) +--- testing: 65 | 4294967295 --- +int(4294967295) +--- testing: 65 | 4294967293 --- +int(4294967293) +--- testing: 65 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 65 | 9.2233720368548E+18 --- +int(-9223372036854775743) +--- testing: 65 | -9223372036854775807 --- +int(-9223372036854775743) +--- testing: 65 | -9.2233720368548E+18 --- +int(-9223372036854775743) +--- testing: -44 | 9223372036854775807 --- +int(-1) +--- testing: -44 | -9223372036854775808 --- +int(-44) +--- testing: -44 | 2147483647 --- +int(-1) +--- testing: -44 | -2147483648 --- +int(-44) +--- testing: -44 | 9223372034707292160 --- +int(-44) +--- testing: -44 | -9223372034707292160 --- +int(-44) +--- testing: -44 | 2147483648 --- +int(-44) +--- testing: -44 | -2147483649 --- +int(-1) +--- testing: -44 | 4294967294 --- +int(-2) +--- testing: -44 | 4294967295 --- +int(-1) +--- testing: -44 | 4294967293 --- +int(-3) +--- testing: -44 | 9223372036854775806 --- +int(-2) +--- testing: -44 | 9.2233720368548E+18 --- +int(-44) +--- testing: -44 | -9223372036854775807 --- +int(-43) +--- testing: -44 | -9.2233720368548E+18 --- +int(-44) +--- testing: 2147483647 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 2147483647 | -9223372036854775808 --- +int(-9223372034707292161) +--- testing: 2147483647 | 2147483647 --- +int(2147483647) +--- testing: 2147483647 | -2147483648 --- +int(-1) +--- testing: 2147483647 | 9223372034707292160 --- +int(9223372036854775807) +--- testing: 2147483647 | -9223372034707292160 --- +int(-9223372032559808513) +--- testing: 2147483647 | 2147483648 --- +int(4294967295) +--- testing: 2147483647 | -2147483649 --- +int(-2147483649) +--- testing: 2147483647 | 4294967294 --- +int(4294967295) +--- testing: 2147483647 | 4294967295 --- +int(4294967295) +--- testing: 2147483647 | 4294967293 --- +int(4294967295) +--- testing: 2147483647 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 2147483647 | 9.2233720368548E+18 --- +int(-9223372034707292161) +--- testing: 2147483647 | -9223372036854775807 --- +int(-9223372034707292161) +--- testing: 2147483647 | -9.2233720368548E+18 --- +int(-9223372034707292161) +--- testing: 9223372036854775807 | 9223372036854775807 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -9223372036854775808 --- +int(-1) +--- testing: 9223372036854775807 | 2147483647 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -2147483648 --- +int(-1) +--- testing: 9223372036854775807 | 9223372034707292160 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -9223372034707292160 --- +int(-1) +--- testing: 9223372036854775807 | 2147483648 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | -2147483649 --- +int(-1) +--- testing: 9223372036854775807 | 4294967294 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 4294967295 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 4294967293 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 9223372036854775806 --- +int(9223372036854775807) +--- testing: 9223372036854775807 | 9.2233720368548E+18 --- +int(-1) +--- testing: 9223372036854775807 | -9223372036854775807 --- +int(-1) +--- testing: 9223372036854775807 | -9.2233720368548E+18 --- +int(-1) +===DONE=== + \ No newline at end of file diff --git a/tests/lang/operators/bitwiseOr_variationStr.phpt b/tests/lang/operators/bitwiseOr_variationStr.phpt new file mode 100644 index 0000000..6c31477 --- /dev/null +++ b/tests/lang/operators/bitwiseOr_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test | operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' | '0' --- +string(2) "30" +--- testing: '0' | '65' --- +string(4) "3635" +--- testing: '0' | '-44' --- +string(6) "3d3434" +--- testing: '0' | '1.2' --- +string(6) "312e32" +--- testing: '0' | '-7.7' --- +string(8) "3d372e37" +--- testing: '0' | 'abc' --- +string(6) "716263" +--- testing: '0' | '123abc' --- +string(12) "313233616263" +--- testing: '0' | '123e5' --- +string(10) "3132336535" +--- testing: '0' | '123e5xyz' --- +string(16) "313233653578797a" +--- testing: '0' | ' 123abc' --- +string(14) "30313233616263" +--- testing: '0' | '123 abc' --- +string(14) "31323320616263" +--- testing: '0' | '123abc ' --- +string(14) "31323361626320" +--- testing: '0' | '3.4a' --- +string(8) "332e3461" +--- testing: '0' | 'a5.9' --- +string(8) "71352e39" +--- testing: '65' | '0' --- +string(4) "3635" +--- testing: '65' | '65' --- +string(4) "3635" +--- testing: '65' | '-44' --- +string(6) "3f3534" +--- testing: '65' | '1.2' --- +string(6) "373f32" +--- testing: '65' | '-7.7' --- +string(8) "3f372e37" +--- testing: '65' | 'abc' --- +string(6) "777763" +--- testing: '65' | '123abc' --- +string(12) "373733616263" +--- testing: '65' | '123e5' --- +string(10) "3737336535" +--- testing: '65' | '123e5xyz' --- +string(16) "373733653578797a" +--- testing: '65' | ' 123abc' --- +string(14) "36353233616263" +--- testing: '65' | '123 abc' --- +string(14) "37373320616263" +--- testing: '65' | '123abc ' --- +string(14) "37373361626320" +--- testing: '65' | '3.4a' --- +string(8) "373f3461" +--- testing: '65' | 'a5.9' --- +string(8) "77352e39" +--- testing: '-44' | '0' --- +string(6) "3d3434" +--- testing: '-44' | '65' --- +string(6) "3f3534" +--- testing: '-44' | '-44' --- +string(6) "2d3434" +--- testing: '-44' | '1.2' --- +string(6) "3d3e36" +--- testing: '-44' | '-7.7' --- +string(8) "2d373e37" +--- testing: '-44' | 'abc' --- +string(6) "6d7677" +--- testing: '-44' | '123abc' --- +string(12) "3d3637616263" +--- testing: '-44' | '123e5' --- +string(10) "3d36376535" +--- testing: '-44' | '123e5xyz' --- +string(16) "3d3637653578797a" +--- testing: '-44' | ' 123abc' --- +string(14) "2d353633616263" +--- testing: '-44' | '123 abc' --- +string(14) "3d363720616263" +--- testing: '-44' | '123abc ' --- +string(14) "3d363761626320" +--- testing: '-44' | '3.4a' --- +string(8) "3f3e3461" +--- testing: '-44' | 'a5.9' --- +string(8) "6d353e39" +--- testing: '1.2' | '0' --- +string(6) "312e32" +--- testing: '1.2' | '65' --- +string(6) "373f32" +--- testing: '1.2' | '-44' --- +string(6) "3d3e36" +--- testing: '1.2' | '1.2' --- +string(6) "312e32" +--- testing: '1.2' | '-7.7' --- +string(8) "3d3f3e37" +--- testing: '1.2' | 'abc' --- +string(6) "716e73" +--- testing: '1.2' | '123abc' --- +string(12) "313e33616263" +--- testing: '1.2' | '123e5' --- +string(10) "313e336535" +--- testing: '1.2' | '123e5xyz' --- +string(16) "313e33653578797a" +--- testing: '1.2' | ' 123abc' --- +string(14) "313f3233616263" +--- testing: '1.2' | '123 abc' --- +string(14) "313e3320616263" +--- testing: '1.2' | '123abc ' --- +string(14) "313e3361626320" +--- testing: '1.2' | '3.4a' --- +string(8) "332e3661" +--- testing: '1.2' | 'a5.9' --- +string(8) "713f3e39" +--- testing: '-7.7' | '0' --- +string(8) "3d372e37" +--- testing: '-7.7' | '65' --- +string(8) "3f372e37" +--- testing: '-7.7' | '-44' --- +string(8) "2d373e37" +--- testing: '-7.7' | '1.2' --- +string(8) "3d3f3e37" +--- testing: '-7.7' | '-7.7' --- +string(8) "2d372e37" +--- testing: '-7.7' | 'abc' --- +string(8) "6d776f37" +--- testing: '-7.7' | '123abc' --- +string(12) "3d373f776263" +--- testing: '-7.7' | '123e5' --- +string(10) "3d373f7735" +--- testing: '-7.7' | '123e5xyz' --- +string(16) "3d373f773578797a" +--- testing: '-7.7' | ' 123abc' --- +string(14) "2d373e37616263" +--- testing: '-7.7' | '123 abc' --- +string(14) "3d373f37616263" +--- testing: '-7.7' | '123abc ' --- +string(14) "3d373f77626320" +--- testing: '-7.7' | '3.4a' --- +string(8) "3f3f3e77" +--- testing: '-7.7' | 'a5.9' --- +string(8) "6d372e3f" +--- testing: 'abc' | '0' --- +string(6) "716263" +--- testing: 'abc' | '65' --- +string(6) "777763" +--- testing: 'abc' | '-44' --- +string(6) "6d7677" +--- testing: 'abc' | '1.2' --- +string(6) "716e73" +--- testing: 'abc' | '-7.7' --- +string(8) "6d776f37" +--- testing: 'abc' | 'abc' --- +string(6) "616263" +--- testing: 'abc' | '123abc' --- +string(12) "717273616263" +--- testing: 'abc' | '123e5' --- +string(10) "7172736535" +--- testing: 'abc' | '123e5xyz' --- +string(16) "717273653578797a" +--- testing: 'abc' | ' 123abc' --- +string(14) "61737333616263" +--- testing: 'abc' | '123 abc' --- +string(14) "71727320616263" +--- testing: 'abc' | '123abc ' --- +string(14) "71727361626320" +--- testing: 'abc' | '3.4a' --- +string(8) "736e7761" +--- testing: 'abc' | 'a5.9' --- +string(8) "61776f39" +--- testing: '123abc' | '0' --- +string(12) "313233616263" +--- testing: '123abc' | '65' --- +string(12) "373733616263" +--- testing: '123abc' | '-44' --- +string(12) "3d3637616263" +--- testing: '123abc' | '1.2' --- +string(12) "313e33616263" +--- testing: '123abc' | '-7.7' --- +string(12) "3d373f776263" +--- testing: '123abc' | 'abc' --- +string(12) "717273616263" +--- testing: '123abc' | '123abc' --- +string(12) "313233616263" +--- testing: '123abc' | '123e5' --- +string(12) "313233657763" +--- testing: '123abc' | '123e5xyz' --- +string(16) "31323365777b797a" +--- testing: '123abc' | ' 123abc' --- +string(14) "31333373636363" +--- testing: '123abc' | '123 abc' --- +string(14) "31323361636363" +--- testing: '123abc' | '123abc ' --- +string(14) "31323361626320" +--- testing: '123abc' | '3.4a' --- +string(12) "333e37616263" +--- testing: '123abc' | 'a5.9' --- +string(12) "71373f796263" +--- testing: '123e5' | '0' --- +string(10) "3132336535" +--- testing: '123e5' | '65' --- +string(10) "3737336535" +--- testing: '123e5' | '-44' --- +string(10) "3d36376535" +--- testing: '123e5' | '1.2' --- +string(10) "313e336535" +--- testing: '123e5' | '-7.7' --- +string(10) "3d373f7735" +--- testing: '123e5' | 'abc' --- +string(10) "7172736535" +--- testing: '123e5' | '123abc' --- +string(12) "313233657763" +--- testing: '123e5' | '123e5' --- +string(10) "3132336535" +--- testing: '123e5' | '123e5xyz' --- +string(16) "313233653578797a" +--- testing: '123e5' | ' 123abc' --- +string(14) "31333377756263" +--- testing: '123e5' | '123 abc' --- +string(14) "31323365756263" +--- testing: '123e5' | '123abc ' --- +string(14) "31323365776320" +--- testing: '123e5' | '3.4a' --- +string(10) "333e376535" +--- testing: '123e5' | 'a5.9' --- +string(10) "71373f7d35" +--- testing: '123e5xyz' | '0' --- +string(16) "313233653578797a" +--- testing: '123e5xyz' | '65' --- +string(16) "373733653578797a" +--- testing: '123e5xyz' | '-44' --- +string(16) "3d3637653578797a" +--- testing: '123e5xyz' | '1.2' --- +string(16) "313e33653578797a" +--- testing: '123e5xyz' | '-7.7' --- +string(16) "3d373f773578797a" +--- testing: '123e5xyz' | 'abc' --- +string(16) "717273653578797a" +--- testing: '123e5xyz' | '123abc' --- +string(16) "31323365777b797a" +--- testing: '123e5xyz' | '123e5' --- +string(16) "313233653578797a" +--- testing: '123e5xyz' | '123e5xyz' --- +string(16) "313233653578797a" +--- testing: '123e5xyz' | ' 123abc' --- +string(16) "31333377757a7b7a" +--- testing: '123e5xyz' | '123 abc' --- +string(16) "31323365757a7b7a" +--- testing: '123e5xyz' | '123abc ' --- +string(16) "31323365777b797a" +--- testing: '123e5xyz' | '3.4a' --- +string(16) "333e37653578797a" +--- testing: '123e5xyz' | 'a5.9' --- +string(16) "71373f7d3578797a" +--- testing: ' 123abc' | '0' --- +string(14) "30313233616263" +--- testing: ' 123abc' | '65' --- +string(14) "36353233616263" +--- testing: ' 123abc' | '-44' --- +string(14) "2d353633616263" +--- testing: ' 123abc' | '1.2' --- +string(14) "313f3233616263" +--- testing: ' 123abc' | '-7.7' --- +string(14) "2d373e37616263" +--- testing: ' 123abc' | 'abc' --- +string(14) "61737333616263" +--- testing: ' 123abc' | '123abc' --- +string(14) "31333373636363" +--- testing: ' 123abc' | '123e5' --- +string(14) "31333377756263" +--- testing: ' 123abc' | '123e5xyz' --- +string(16) "31333377757a7b7a" +--- testing: ' 123abc' | ' 123abc' --- +string(14) "20313233616263" +--- testing: ' 123abc' | '123 abc' --- +string(14) "31333333616263" +--- testing: ' 123abc' | '123abc ' --- +string(14) "31333373636363" +--- testing: ' 123abc' | '3.4a' --- +string(14) "333f3673616263" +--- testing: ' 123abc' | 'a5.9' --- +string(14) "61353e3b616263" +--- testing: '123 abc' | '0' --- +string(14) "31323320616263" +--- testing: '123 abc' | '65' --- +string(14) "37373320616263" +--- testing: '123 abc' | '-44' --- +string(14) "3d363720616263" +--- testing: '123 abc' | '1.2' --- +string(14) "313e3320616263" +--- testing: '123 abc' | '-7.7' --- +string(14) "3d373f37616263" +--- testing: '123 abc' | 'abc' --- +string(14) "71727320616263" +--- testing: '123 abc' | '123abc' --- +string(14) "31323361636363" +--- testing: '123 abc' | '123e5' --- +string(14) "31323365756263" +--- testing: '123 abc' | '123e5xyz' --- +string(16) "31323365757a7b7a" +--- testing: '123 abc' | ' 123abc' --- +string(14) "31333333616263" +--- testing: '123 abc' | '123 abc' --- +string(14) "31323320616263" +--- testing: '123 abc' | '123abc ' --- +string(14) "31323361636363" +--- testing: '123 abc' | '3.4a' --- +string(14) "333e3761616263" +--- testing: '123 abc' | 'a5.9' --- +string(14) "71373f39616263" +--- testing: '123abc ' | '0' --- +string(14) "31323361626320" +--- testing: '123abc ' | '65' --- +string(14) "37373361626320" +--- testing: '123abc ' | '-44' --- +string(14) "3d363761626320" +--- testing: '123abc ' | '1.2' --- +string(14) "313e3361626320" +--- testing: '123abc ' | '-7.7' --- +string(14) "3d373f77626320" +--- testing: '123abc ' | 'abc' --- +string(14) "71727361626320" +--- testing: '123abc ' | '123abc' --- +string(14) "31323361626320" +--- testing: '123abc ' | '123e5' --- +string(14) "31323365776320" +--- testing: '123abc ' | '123e5xyz' --- +string(16) "31323365777b797a" +--- testing: '123abc ' | ' 123abc' --- +string(14) "31333373636363" +--- testing: '123abc ' | '123 abc' --- +string(14) "31323361636363" +--- testing: '123abc ' | '123abc ' --- +string(14) "31323361626320" +--- testing: '123abc ' | '3.4a' --- +string(14) "333e3761626320" +--- testing: '123abc ' | 'a5.9' --- +string(14) "71373f79626320" +--- testing: '3.4a' | '0' --- +string(8) "332e3461" +--- testing: '3.4a' | '65' --- +string(8) "373f3461" +--- testing: '3.4a' | '-44' --- +string(8) "3f3e3461" +--- testing: '3.4a' | '1.2' --- +string(8) "332e3661" +--- testing: '3.4a' | '-7.7' --- +string(8) "3f3f3e77" +--- testing: '3.4a' | 'abc' --- +string(8) "736e7761" +--- testing: '3.4a' | '123abc' --- +string(12) "333e37616263" +--- testing: '3.4a' | '123e5' --- +string(10) "333e376535" +--- testing: '3.4a' | '123e5xyz' --- +string(16) "333e37653578797a" +--- testing: '3.4a' | ' 123abc' --- +string(14) "333f3673616263" +--- testing: '3.4a' | '123 abc' --- +string(14) "333e3761616263" +--- testing: '3.4a' | '123abc ' --- +string(14) "333e3761626320" +--- testing: '3.4a' | '3.4a' --- +string(8) "332e3461" +--- testing: '3.4a' | 'a5.9' --- +string(8) "733f3e79" +--- testing: 'a5.9' | '0' --- +string(8) "71352e39" +--- testing: 'a5.9' | '65' --- +string(8) "77352e39" +--- testing: 'a5.9' | '-44' --- +string(8) "6d353e39" +--- testing: 'a5.9' | '1.2' --- +string(8) "713f3e39" +--- testing: 'a5.9' | '-7.7' --- +string(8) "6d372e3f" +--- testing: 'a5.9' | 'abc' --- +string(8) "61776f39" +--- testing: 'a5.9' | '123abc' --- +string(12) "71373f796263" +--- testing: 'a5.9' | '123e5' --- +string(10) "71373f7d35" +--- testing: 'a5.9' | '123e5xyz' --- +string(16) "71373f7d3578797a" +--- testing: 'a5.9' | ' 123abc' --- +string(14) "61353e3b616263" +--- testing: 'a5.9' | '123 abc' --- +string(14) "71373f39616263" +--- testing: 'a5.9' | '123abc ' --- +string(14) "71373f79626320" +--- testing: 'a5.9' | '3.4a' --- +string(8) "733f3e79" +--- testing: 'a5.9' | 'a5.9' --- +string(8) "61352e39" +===DONE=== diff --git a/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt new file mode 100644 index 0000000..24da2d0 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftLeft_basiclong_64bit.phpt @@ -0,0 +1,583 @@ +--TEST-- +Test << operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 << 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << 1 --- +int(-2) +--- testing: 9223372036854775807 << -1 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << 7 --- +int(-128) +--- testing: 9223372036854775807 << 9 --- +int(-512) +--- testing: 9223372036854775807 << 65 --- +int(-2) +--- testing: 9223372036854775807 << -44 --- +int(-1048576) +--- testing: 9223372036854775807 << 2147483647 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 << 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 << 1 --- +int(0) +--- testing: -9223372036854775808 << -1 --- +int(0) +--- testing: -9223372036854775808 << 7 --- +int(0) +--- testing: -9223372036854775808 << 9 --- +int(0) +--- testing: -9223372036854775808 << 65 --- +int(0) +--- testing: -9223372036854775808 << -44 --- +int(0) +--- testing: -9223372036854775808 << 2147483647 --- +int(0) +--- testing: -9223372036854775808 << 9223372036854775807 --- +int(0) +--- testing: 2147483647 << 0 --- +int(2147483647) +--- testing: 2147483647 << 1 --- +int(4294967294) +--- testing: 2147483647 << -1 --- +int(-9223372036854775808) +--- testing: 2147483647 << 7 --- +int(274877906816) +--- testing: 2147483647 << 9 --- +int(1099511627264) +--- testing: 2147483647 << 65 --- +int(4294967294) +--- testing: 2147483647 << -44 --- +int(2251799812636672) +--- testing: 2147483647 << 2147483647 --- +int(-9223372036854775808) +--- testing: 2147483647 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -2147483648 << 0 --- +int(-2147483648) +--- testing: -2147483648 << 1 --- +int(-4294967296) +--- testing: -2147483648 << -1 --- +int(0) +--- testing: -2147483648 << 7 --- +int(-274877906944) +--- testing: -2147483648 << 9 --- +int(-1099511627776) +--- testing: -2147483648 << 65 --- +int(-4294967296) +--- testing: -2147483648 << -44 --- +int(-2251799813685248) +--- testing: -2147483648 << 2147483647 --- +int(0) +--- testing: -2147483648 << 9223372036854775807 --- +int(0) +--- testing: 9223372034707292160 << 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 << 1 --- +int(-4294967296) +--- testing: 9223372034707292160 << -1 --- +int(0) +--- testing: 9223372034707292160 << 7 --- +int(-274877906944) +--- testing: 9223372034707292160 << 9 --- +int(-1099511627776) +--- testing: 9223372034707292160 << 65 --- +int(-4294967296) +--- testing: 9223372034707292160 << -44 --- +int(-2251799813685248) +--- testing: 9223372034707292160 << 2147483647 --- +int(0) +--- testing: 9223372034707292160 << 9223372036854775807 --- +int(0) +--- testing: -9223372034707292160 << 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 << 1 --- +int(4294967296) +--- testing: -9223372034707292160 << -1 --- +int(0) +--- testing: -9223372034707292160 << 7 --- +int(274877906944) +--- testing: -9223372034707292160 << 9 --- +int(1099511627776) +--- testing: -9223372034707292160 << 65 --- +int(4294967296) +--- testing: -9223372034707292160 << -44 --- +int(2251799813685248) +--- testing: -9223372034707292160 << 2147483647 --- +int(0) +--- testing: -9223372034707292160 << 9223372036854775807 --- +int(0) +--- testing: 2147483648 << 0 --- +int(2147483648) +--- testing: 2147483648 << 1 --- +int(4294967296) +--- testing: 2147483648 << -1 --- +int(0) +--- testing: 2147483648 << 7 --- +int(274877906944) +--- testing: 2147483648 << 9 --- +int(1099511627776) +--- testing: 2147483648 << 65 --- +int(4294967296) +--- testing: 2147483648 << -44 --- +int(2251799813685248) +--- testing: 2147483648 << 2147483647 --- +int(0) +--- testing: 2147483648 << 9223372036854775807 --- +int(0) +--- testing: -2147483649 << 0 --- +int(-2147483649) +--- testing: -2147483649 << 1 --- +int(-4294967298) +--- testing: -2147483649 << -1 --- +int(-9223372036854775808) +--- testing: -2147483649 << 7 --- +int(-274877907072) +--- testing: -2147483649 << 9 --- +int(-1099511628288) +--- testing: -2147483649 << 65 --- +int(-4294967298) +--- testing: -2147483649 << -44 --- +int(-2251799814733824) +--- testing: -2147483649 << 2147483647 --- +int(-9223372036854775808) +--- testing: -2147483649 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 4294967294 << 0 --- +int(4294967294) +--- testing: 4294967294 << 1 --- +int(8589934588) +--- testing: 4294967294 << -1 --- +int(0) +--- testing: 4294967294 << 7 --- +int(549755813632) +--- testing: 4294967294 << 9 --- +int(2199023254528) +--- testing: 4294967294 << 65 --- +int(8589934588) +--- testing: 4294967294 << -44 --- +int(4503599625273344) +--- testing: 4294967294 << 2147483647 --- +int(0) +--- testing: 4294967294 << 9223372036854775807 --- +int(0) +--- testing: 4294967295 << 0 --- +int(4294967295) +--- testing: 4294967295 << 1 --- +int(8589934590) +--- testing: 4294967295 << -1 --- +int(-9223372036854775808) +--- testing: 4294967295 << 7 --- +int(549755813760) +--- testing: 4294967295 << 9 --- +int(2199023255040) +--- testing: 4294967295 << 65 --- +int(8589934590) +--- testing: 4294967295 << -44 --- +int(4503599626321920) +--- testing: 4294967295 << 2147483647 --- +int(-9223372036854775808) +--- testing: 4294967295 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 4294967293 << 0 --- +int(4294967293) +--- testing: 4294967293 << 1 --- +int(8589934586) +--- testing: 4294967293 << -1 --- +int(-9223372036854775808) +--- testing: 4294967293 << 7 --- +int(549755813504) +--- testing: 4294967293 << 9 --- +int(2199023254016) +--- testing: 4294967293 << 65 --- +int(8589934586) +--- testing: 4294967293 << -44 --- +int(4503599624224768) +--- testing: 4294967293 << 2147483647 --- +int(-9223372036854775808) +--- testing: 4294967293 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 9223372036854775806 << 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 << 1 --- +int(-4) +--- testing: 9223372036854775806 << -1 --- +int(0) +--- testing: 9223372036854775806 << 7 --- +int(-256) +--- testing: 9223372036854775806 << 9 --- +int(-1024) +--- testing: 9223372036854775806 << 65 --- +int(-4) +--- testing: 9223372036854775806 << -44 --- +int(-2097152) +--- testing: 9223372036854775806 << 2147483647 --- +int(0) +--- testing: 9223372036854775806 << 9223372036854775807 --- +int(0) +--- testing: 9.2233720368548E+18 << 0 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 << 1 --- +int(0) +--- testing: 9.2233720368548E+18 << -1 --- +int(0) +--- testing: 9.2233720368548E+18 << 7 --- +int(0) +--- testing: 9.2233720368548E+18 << 9 --- +int(0) +--- testing: 9.2233720368548E+18 << 65 --- +int(0) +--- testing: 9.2233720368548E+18 << -44 --- +int(0) +--- testing: 9.2233720368548E+18 << 2147483647 --- +int(0) +--- testing: 9.2233720368548E+18 << 9223372036854775807 --- +int(0) +--- testing: -9223372036854775807 << 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 << 1 --- +int(2) +--- testing: -9223372036854775807 << -1 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 << 7 --- +int(128) +--- testing: -9223372036854775807 << 9 --- +int(512) +--- testing: -9223372036854775807 << 65 --- +int(2) +--- testing: -9223372036854775807 << -44 --- +int(1048576) +--- testing: -9223372036854775807 << 2147483647 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 << 0 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 << 1 --- +int(0) +--- testing: -9.2233720368548E+18 << -1 --- +int(0) +--- testing: -9.2233720368548E+18 << 7 --- +int(0) +--- testing: -9.2233720368548E+18 << 9 --- +int(0) +--- testing: -9.2233720368548E+18 << 65 --- +int(0) +--- testing: -9.2233720368548E+18 << -44 --- +int(0) +--- testing: -9.2233720368548E+18 << 2147483647 --- +int(0) +--- testing: -9.2233720368548E+18 << 9223372036854775807 --- +int(0) +--- testing: 0 << 9223372036854775807 --- +int(0) +--- testing: 0 << -9223372036854775808 --- +int(0) +--- testing: 0 << 2147483647 --- +int(0) +--- testing: 0 << -2147483648 --- +int(0) +--- testing: 0 << 9223372034707292160 --- +int(0) +--- testing: 0 << -9223372034707292160 --- +int(0) +--- testing: 0 << 2147483648 --- +int(0) +--- testing: 0 << -2147483649 --- +int(0) +--- testing: 0 << 4294967294 --- +int(0) +--- testing: 0 << 4294967295 --- +int(0) +--- testing: 0 << 4294967293 --- +int(0) +--- testing: 0 << 9223372036854775806 --- +int(0) +--- testing: 0 << 9.2233720368548E+18 --- +int(0) +--- testing: 0 << -9223372036854775807 --- +int(0) +--- testing: 0 << -9.2233720368548E+18 --- +int(0) +--- testing: 1 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 1 << -9223372036854775808 --- +int(1) +--- testing: 1 << 2147483647 --- +int(-9223372036854775808) +--- testing: 1 << -2147483648 --- +int(1) +--- testing: 1 << 9223372034707292160 --- +int(1) +--- testing: 1 << -9223372034707292160 --- +int(1) +--- testing: 1 << 2147483648 --- +int(1) +--- testing: 1 << -2147483649 --- +int(-9223372036854775808) +--- testing: 1 << 4294967294 --- +int(4611686018427387904) +--- testing: 1 << 4294967295 --- +int(-9223372036854775808) +--- testing: 1 << 4294967293 --- +int(2305843009213693952) +--- testing: 1 << 9223372036854775806 --- +int(4611686018427387904) +--- testing: 1 << 9.2233720368548E+18 --- +int(1) +--- testing: 1 << -9223372036854775807 --- +int(2) +--- testing: 1 << -9.2233720368548E+18 --- +int(1) +--- testing: -1 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -1 << -9223372036854775808 --- +int(-1) +--- testing: -1 << 2147483647 --- +int(-9223372036854775808) +--- testing: -1 << -2147483648 --- +int(-1) +--- testing: -1 << 9223372034707292160 --- +int(-1) +--- testing: -1 << -9223372034707292160 --- +int(-1) +--- testing: -1 << 2147483648 --- +int(-1) +--- testing: -1 << -2147483649 --- +int(-9223372036854775808) +--- testing: -1 << 4294967294 --- +int(-4611686018427387904) +--- testing: -1 << 4294967295 --- +int(-9223372036854775808) +--- testing: -1 << 4294967293 --- +int(-2305843009213693952) +--- testing: -1 << 9223372036854775806 --- +int(-4611686018427387904) +--- testing: -1 << 9.2233720368548E+18 --- +int(-1) +--- testing: -1 << -9223372036854775807 --- +int(-2) +--- testing: -1 << -9.2233720368548E+18 --- +int(-1) +--- testing: 7 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 7 << -9223372036854775808 --- +int(7) +--- testing: 7 << 2147483647 --- +int(-9223372036854775808) +--- testing: 7 << -2147483648 --- +int(7) +--- testing: 7 << 9223372034707292160 --- +int(7) +--- testing: 7 << -9223372034707292160 --- +int(7) +--- testing: 7 << 2147483648 --- +int(7) +--- testing: 7 << -2147483649 --- +int(-9223372036854775808) +--- testing: 7 << 4294967294 --- +int(-4611686018427387904) +--- testing: 7 << 4294967295 --- +int(-9223372036854775808) +--- testing: 7 << 4294967293 --- +int(-2305843009213693952) +--- testing: 7 << 9223372036854775806 --- +int(-4611686018427387904) +--- testing: 7 << 9.2233720368548E+18 --- +int(7) +--- testing: 7 << -9223372036854775807 --- +int(14) +--- testing: 7 << -9.2233720368548E+18 --- +int(7) +--- testing: 9 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 9 << -9223372036854775808 --- +int(9) +--- testing: 9 << 2147483647 --- +int(-9223372036854775808) +--- testing: 9 << -2147483648 --- +int(9) +--- testing: 9 << 9223372034707292160 --- +int(9) +--- testing: 9 << -9223372034707292160 --- +int(9) +--- testing: 9 << 2147483648 --- +int(9) +--- testing: 9 << -2147483649 --- +int(-9223372036854775808) +--- testing: 9 << 4294967294 --- +int(4611686018427387904) +--- testing: 9 << 4294967295 --- +int(-9223372036854775808) +--- testing: 9 << 4294967293 --- +int(2305843009213693952) +--- testing: 9 << 9223372036854775806 --- +int(4611686018427387904) +--- testing: 9 << 9.2233720368548E+18 --- +int(9) +--- testing: 9 << -9223372036854775807 --- +int(18) +--- testing: 9 << -9.2233720368548E+18 --- +int(9) +--- testing: 65 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 65 << -9223372036854775808 --- +int(65) +--- testing: 65 << 2147483647 --- +int(-9223372036854775808) +--- testing: 65 << -2147483648 --- +int(65) +--- testing: 65 << 9223372034707292160 --- +int(65) +--- testing: 65 << -9223372034707292160 --- +int(65) +--- testing: 65 << 2147483648 --- +int(65) +--- testing: 65 << -2147483649 --- +int(-9223372036854775808) +--- testing: 65 << 4294967294 --- +int(4611686018427387904) +--- testing: 65 << 4294967295 --- +int(-9223372036854775808) +--- testing: 65 << 4294967293 --- +int(2305843009213693952) +--- testing: 65 << 9223372036854775806 --- +int(4611686018427387904) +--- testing: 65 << 9.2233720368548E+18 --- +int(65) +--- testing: 65 << -9223372036854775807 --- +int(130) +--- testing: 65 << -9.2233720368548E+18 --- +int(65) +--- testing: -44 << 9223372036854775807 --- +int(0) +--- testing: -44 << -9223372036854775808 --- +int(-44) +--- testing: -44 << 2147483647 --- +int(0) +--- testing: -44 << -2147483648 --- +int(-44) +--- testing: -44 << 9223372034707292160 --- +int(-44) +--- testing: -44 << -9223372034707292160 --- +int(-44) +--- testing: -44 << 2147483648 --- +int(-44) +--- testing: -44 << -2147483649 --- +int(0) +--- testing: -44 << 4294967294 --- +int(0) +--- testing: -44 << 4294967295 --- +int(0) +--- testing: -44 << 4294967293 --- +int(-9223372036854775808) +--- testing: -44 << 9223372036854775806 --- +int(0) +--- testing: -44 << 9.2233720368548E+18 --- +int(-44) +--- testing: -44 << -9223372036854775807 --- +int(-88) +--- testing: -44 << -9.2233720368548E+18 --- +int(-44) +--- testing: 2147483647 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 2147483647 << -9223372036854775808 --- +int(2147483647) +--- testing: 2147483647 << 2147483647 --- +int(-9223372036854775808) +--- testing: 2147483647 << -2147483648 --- +int(2147483647) +--- testing: 2147483647 << 9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 << -9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 << 2147483648 --- +int(2147483647) +--- testing: 2147483647 << -2147483649 --- +int(-9223372036854775808) +--- testing: 2147483647 << 4294967294 --- +int(-4611686018427387904) +--- testing: 2147483647 << 4294967295 --- +int(-9223372036854775808) +--- testing: 2147483647 << 4294967293 --- +int(-2305843009213693952) +--- testing: 2147483647 << 9223372036854775806 --- +int(-4611686018427387904) +--- testing: 2147483647 << 9.2233720368548E+18 --- +int(2147483647) +--- testing: 2147483647 << -9223372036854775807 --- +int(4294967294) +--- testing: 2147483647 << -9.2233720368548E+18 --- +int(2147483647) +--- testing: 9223372036854775807 << 9223372036854775807 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << -9223372036854775808 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << 2147483647 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << -2147483648 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << 9223372034707292160 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << -9223372034707292160 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << 2147483648 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << -2147483649 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << 4294967294 --- +int(-4611686018427387904) +--- testing: 9223372036854775807 << 4294967295 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 << 4294967293 --- +int(-2305843009213693952) +--- testing: 9223372036854775807 << 9223372036854775806 --- +int(-4611686018427387904) +--- testing: 9223372036854775807 << 9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: 9223372036854775807 << -9223372036854775807 --- +int(-2) +--- testing: 9223372036854775807 << -9.2233720368548E+18 --- +int(9223372036854775807) +===DONE=== + \ No newline at end of file diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt new file mode 100644 index 0000000..b1bc437 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt @@ -0,0 +1,421 @@ +--TEST-- +Test << operator : various numbers as strings +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' << '0' --- +string(2) "30" +--- testing: '0' << '65' --- +string(2) "30" +--- testing: '0' << '-44' --- +string(2) "30" +--- testing: '0' << '1.2' --- +string(2) "30" +--- testing: '0' << '-7.7' --- +string(2) "30" +--- testing: '0' << 'abc' --- +string(2) "30" +--- testing: '0' << '123abc' --- +string(2) "30" +--- testing: '0' << '123e5' --- +string(2) "30" +--- testing: '0' << '123e5xyz' --- +string(2) "30" +--- testing: '0' << ' 123abc' --- +string(2) "30" +--- testing: '0' << '123 abc' --- +string(2) "30" +--- testing: '0' << '123abc ' --- +string(2) "30" +--- testing: '0' << '3.4a' --- +string(2) "30" +--- testing: '0' << 'a5.9' --- +string(2) "30" +--- testing: '65' << '0' --- +string(4) "3635" +--- testing: '65' << '65' --- +string(6) "313330" +--- testing: '65' << '-44' --- +string(16) "3638313537343430" +--- testing: '65' << '1.2' --- +string(6) "313330" +--- testing: '65' << '-7.7' --- +string(22) "2d32313133393239323136" +--- testing: '65' << 'abc' --- +string(4) "3635" +--- testing: '65' << '123abc' --- +string(18) "313334323137373238" +--- testing: '65' << '123e5' --- +string(18) "313334323137373238" +--- testing: '65' << '123e5xyz' --- +string(18) "313334323137373238" +--- testing: '65' << ' 123abc' --- +string(18) "313334323137373238" +--- testing: '65' << '123 abc' --- +string(18) "313334323137373238" +--- testing: '65' << '123abc ' --- +string(18) "313334323137373238" +--- testing: '65' << '3.4a' --- +string(6) "353230" +--- testing: '65' << 'a5.9' --- +string(4) "3635" +--- testing: '-44' << '0' --- +string(6) "2d3434" +--- testing: '-44' << '65' --- +string(6) "2d3838" +--- testing: '-44' << '-44' --- +string(18) "2d3436313337333434" +--- testing: '-44' << '1.2' --- +string(6) "2d3838" +--- testing: '-44' << '-7.7' --- +string(22) "2d31343736333935303038" +--- testing: '-44' << 'abc' --- +string(6) "2d3434" +--- testing: '-44' << '123abc' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << '123e5' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << '123e5xyz' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << ' 123abc' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << '123 abc' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << '123abc ' --- +string(22) "2d31363130363132373336" +--- testing: '-44' << '3.4a' --- +string(8) "2d333532" +--- testing: '-44' << 'a5.9' --- +string(6) "2d3434" +--- testing: '1.2' << '0' --- +string(2) "31" +--- testing: '1.2' << '65' --- +string(2) "32" +--- testing: '1.2' << '-44' --- +string(14) "31303438353736" +--- testing: '1.2' << '1.2' --- +string(2) "32" +--- testing: '1.2' << '-7.7' --- +string(16) "3333353534343332" +--- testing: '1.2' << 'abc' --- +string(2) "31" +--- testing: '1.2' << '123abc' --- +string(18) "313334323137373238" +--- testing: '1.2' << '123e5' --- +string(18) "313334323137373238" +--- testing: '1.2' << '123e5xyz' --- +string(18) "313334323137373238" +--- testing: '1.2' << ' 123abc' --- +string(18) "313334323137373238" +--- testing: '1.2' << '123 abc' --- +string(18) "313334323137373238" +--- testing: '1.2' << '123abc ' --- +string(18) "313334323137373238" +--- testing: '1.2' << '3.4a' --- +string(2) "38" +--- testing: '1.2' << 'a5.9' --- +string(2) "31" +--- testing: '-7.7' << '0' --- +string(4) "2d37" +--- testing: '-7.7' << '65' --- +string(6) "2d3134" +--- testing: '-7.7' << '-44' --- +string(16) "2d37333430303332" +--- testing: '-7.7' << '1.2' --- +string(6) "2d3134" +--- testing: '-7.7' << '-7.7' --- +string(20) "2d323334383831303234" +--- testing: '-7.7' << 'abc' --- +string(4) "2d37" +--- testing: '-7.7' << '123abc' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << '123e5' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << '123e5xyz' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << ' 123abc' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << '123 abc' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << '123abc ' --- +string(20) "2d393339353234303936" +--- testing: '-7.7' << '3.4a' --- +string(6) "2d3536" +--- testing: '-7.7' << 'a5.9' --- +string(4) "2d37" +--- testing: 'abc' << '0' --- +string(2) "30" +--- testing: 'abc' << '65' --- +string(2) "30" +--- testing: 'abc' << '-44' --- +string(2) "30" +--- testing: 'abc' << '1.2' --- +string(2) "30" +--- testing: 'abc' << '-7.7' --- +string(2) "30" +--- testing: 'abc' << 'abc' --- +string(2) "30" +--- testing: 'abc' << '123abc' --- +string(2) "30" +--- testing: 'abc' << '123e5' --- +string(2) "30" +--- testing: 'abc' << '123e5xyz' --- +string(2) "30" +--- testing: 'abc' << ' 123abc' --- +string(2) "30" +--- testing: 'abc' << '123 abc' --- +string(2) "30" +--- testing: 'abc' << '123abc ' --- +string(2) "30" +--- testing: 'abc' << '3.4a' --- +string(2) "30" +--- testing: 'abc' << 'a5.9' --- +string(2) "30" +--- testing: '123abc' << '0' --- +string(6) "313233" +--- testing: '123abc' << '65' --- +string(6) "323436" +--- testing: '123abc' << '-44' --- +string(18) "313238393734383438" +--- testing: '123abc' << '1.2' --- +string(6) "323436" +--- testing: '123abc' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: '123abc' << 'abc' --- +string(6) "313233" +--- testing: '123abc' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: '123abc' << '3.4a' --- +string(6) "393834" +--- testing: '123abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123e5' << '0' --- +string(6) "313233" +--- testing: '123e5' << '65' --- +string(6) "323436" +--- testing: '123e5' << '-44' --- +string(18) "313238393734383438" +--- testing: '123e5' << '1.2' --- +string(6) "323436" +--- testing: '123e5' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: '123e5' << 'abc' --- +string(6) "313233" +--- testing: '123e5' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: '123e5' << '3.4a' --- +string(6) "393834" +--- testing: '123e5' << 'a5.9' --- +string(6) "313233" +--- testing: '123e5xyz' << '0' --- +string(6) "313233" +--- testing: '123e5xyz' << '65' --- +string(6) "323436" +--- testing: '123e5xyz' << '-44' --- +string(18) "313238393734383438" +--- testing: '123e5xyz' << '1.2' --- +string(6) "323436" +--- testing: '123e5xyz' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: '123e5xyz' << 'abc' --- +string(6) "313233" +--- testing: '123e5xyz' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: '123e5xyz' << '3.4a' --- +string(6) "393834" +--- testing: '123e5xyz' << 'a5.9' --- +string(6) "313233" +--- testing: ' 123abc' << '0' --- +string(6) "313233" +--- testing: ' 123abc' << '65' --- +string(6) "323436" +--- testing: ' 123abc' << '-44' --- +string(18) "313238393734383438" +--- testing: ' 123abc' << '1.2' --- +string(6) "323436" +--- testing: ' 123abc' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: ' 123abc' << 'abc' --- +string(6) "313233" +--- testing: ' 123abc' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: ' 123abc' << '3.4a' --- +string(6) "393834" +--- testing: ' 123abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123 abc' << '0' --- +string(6) "313233" +--- testing: '123 abc' << '65' --- +string(6) "323436" +--- testing: '123 abc' << '-44' --- +string(18) "313238393734383438" +--- testing: '123 abc' << '1.2' --- +string(6) "323436" +--- testing: '123 abc' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: '123 abc' << 'abc' --- +string(6) "313233" +--- testing: '123 abc' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: '123 abc' << '3.4a' --- +string(6) "393834" +--- testing: '123 abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123abc ' << '0' --- +string(6) "313233" +--- testing: '123abc ' << '65' --- +string(6) "323436" +--- testing: '123abc ' << '-44' --- +string(18) "313238393734383438" +--- testing: '123abc ' << '1.2' --- +string(6) "323436" +--- testing: '123abc ' << '-7.7' --- +string(20) "2d313637373732313630" +--- testing: '123abc ' << 'abc' --- +string(6) "313233" +--- testing: '123abc ' << '123abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << '123e5' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << '123e5xyz' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << ' 123abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << '123 abc' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << '123abc ' --- +string(20) "2d363731303838363430" +--- testing: '123abc ' << '3.4a' --- +string(6) "393834" +--- testing: '123abc ' << 'a5.9' --- +string(6) "313233" +--- testing: '3.4a' << '0' --- +string(2) "33" +--- testing: '3.4a' << '65' --- +string(2) "36" +--- testing: '3.4a' << '-44' --- +string(14) "33313435373238" +--- testing: '3.4a' << '1.2' --- +string(2) "36" +--- testing: '3.4a' << '-7.7' --- +string(18) "313030363633323936" +--- testing: '3.4a' << 'abc' --- +string(2) "33" +--- testing: '3.4a' << '123abc' --- +string(18) "343032363533313834" +--- testing: '3.4a' << '123e5' --- +string(18) "343032363533313834" +--- testing: '3.4a' << '123e5xyz' --- +string(18) "343032363533313834" +--- testing: '3.4a' << ' 123abc' --- +string(18) "343032363533313834" +--- testing: '3.4a' << '123 abc' --- +string(18) "343032363533313834" +--- testing: '3.4a' << '123abc ' --- +string(18) "343032363533313834" +--- testing: '3.4a' << '3.4a' --- +string(4) "3234" +--- testing: '3.4a' << 'a5.9' --- +string(2) "33" +--- testing: 'a5.9' << '0' --- +string(2) "30" +--- testing: 'a5.9' << '65' --- +string(2) "30" +--- testing: 'a5.9' << '-44' --- +string(2) "30" +--- testing: 'a5.9' << '1.2' --- +string(2) "30" +--- testing: 'a5.9' << '-7.7' --- +string(2) "30" +--- testing: 'a5.9' << 'abc' --- +string(2) "30" +--- testing: 'a5.9' << '123abc' --- +string(2) "30" +--- testing: 'a5.9' << '123e5' --- +string(2) "30" +--- testing: 'a5.9' << '123e5xyz' --- +string(2) "30" +--- testing: 'a5.9' << ' 123abc' --- +string(2) "30" +--- testing: 'a5.9' << '123 abc' --- +string(2) "30" +--- testing: 'a5.9' << '123abc ' --- +string(2) "30" +--- testing: 'a5.9' << '3.4a' --- +string(2) "30" +--- testing: 'a5.9' << 'a5.9' --- +string(2) "30" +===DONE=== + diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt new file mode 100644 index 0000000..0b697c8 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt @@ -0,0 +1,420 @@ +--TEST-- +Test << operator : various numbers as strings +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' << '0' --- +string(2) "30" +--- testing: '0' << '65' --- +string(2) "30" +--- testing: '0' << '-44' --- +string(2) "30" +--- testing: '0' << '1.2' --- +string(2) "30" +--- testing: '0' << '-7.7' --- +string(2) "30" +--- testing: '0' << 'abc' --- +string(2) "30" +--- testing: '0' << '123abc' --- +string(2) "30" +--- testing: '0' << '123e5' --- +string(2) "30" +--- testing: '0' << '123e5xyz' --- +string(2) "30" +--- testing: '0' << ' 123abc' --- +string(2) "30" +--- testing: '0' << '123 abc' --- +string(2) "30" +--- testing: '0' << '123abc ' --- +string(2) "30" +--- testing: '0' << '3.4a' --- +string(2) "30" +--- testing: '0' << 'a5.9' --- +string(2) "30" +--- testing: '65' << '0' --- +string(4) "3635" +--- testing: '65' << '65' --- +string(6) "313330" +--- testing: '65' << '-44' --- +string(16) "3638313537343430" +--- testing: '65' << '1.2' --- +string(6) "313330" +--- testing: '65' << '-7.7' --- +string(40) "2d39303739323536383438373738393139393336" +--- testing: '65' << 'abc' --- +string(4) "3635" +--- testing: '65' << '123abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << '123e5' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << '123e5xyz' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << ' 123abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << '123 abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << '123abc ' --- +string(36) "353736343630373532333033343233343838" +--- testing: '65' << '3.4a' --- +string(6) "353230" +--- testing: '65' << 'a5.9' --- +string(4) "3635" +--- testing: '-44' << '0' --- +string(6) "2d3434" +--- testing: '-44' << '65' --- +string(6) "2d3838" +--- testing: '-44' << '-44' --- +string(18) "2d3436313337333434" +--- testing: '-44' << '1.2' --- +string(6) "2d3838" +--- testing: '-44' << '-7.7' --- +string(40) "2d36333431303638323735333337363538333638" +--- testing: '-44' << 'abc' --- +string(6) "2d3434" +--- testing: '-44' << '123abc' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << '123e5' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << '123e5xyz' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << ' 123abc' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << '123 abc' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << '123abc ' --- +string(40) "2d36393137353239303237363431303831383536" +--- testing: '-44' << '3.4a' --- +string(8) "2d333532" +--- testing: '-44' << 'a5.9' --- +string(6) "2d3434" +--- testing: '1.2' << '0' --- +string(2) "31" +--- testing: '1.2' << '65' --- +string(2) "32" +--- testing: '1.2' << '-44' --- +string(14) "31303438353736" +--- testing: '1.2' << '1.2' --- +string(2) "32" +--- testing: '1.2' << '-7.7' --- +string(36) "313434313135313838303735383535383732" +--- testing: '1.2' << 'abc' --- +string(2) "31" +--- testing: '1.2' << '123abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << '123e5' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << '123e5xyz' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << ' 123abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << '123 abc' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << '123abc ' --- +string(36) "353736343630373532333033343233343838" +--- testing: '1.2' << '3.4a' --- +string(2) "38" +--- testing: '1.2' << 'a5.9' --- +string(2) "31" +--- testing: '-7.7' << '0' --- +string(4) "2d37" +--- testing: '-7.7' << '65' --- +string(6) "2d3134" +--- testing: '-7.7' << '-44' --- +string(16) "2d37333430303332" +--- testing: '-7.7' << '1.2' --- +string(6) "2d3134" +--- testing: '-7.7' << '-7.7' --- +string(40) "2d31303038383036333136353330393931313034" +--- testing: '-7.7' << 'abc' --- +string(4) "2d37" +--- testing: '-7.7' << '123abc' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << '123e5' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << '123e5xyz' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << ' 123abc' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << '123 abc' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << '123abc ' --- +string(40) "2d34303335323235323636313233393634343136" +--- testing: '-7.7' << '3.4a' --- +string(6) "2d3536" +--- testing: '-7.7' << 'a5.9' --- +string(4) "2d37" +--- testing: 'abc' << '0' --- +string(2) "30" +--- testing: 'abc' << '65' --- +string(2) "30" +--- testing: 'abc' << '-44' --- +string(2) "30" +--- testing: 'abc' << '1.2' --- +string(2) "30" +--- testing: 'abc' << '-7.7' --- +string(2) "30" +--- testing: 'abc' << 'abc' --- +string(2) "30" +--- testing: 'abc' << '123abc' --- +string(2) "30" +--- testing: 'abc' << '123e5' --- +string(2) "30" +--- testing: 'abc' << '123e5xyz' --- +string(2) "30" +--- testing: 'abc' << ' 123abc' --- +string(2) "30" +--- testing: 'abc' << '123 abc' --- +string(2) "30" +--- testing: 'abc' << '123abc ' --- +string(2) "30" +--- testing: 'abc' << '3.4a' --- +string(2) "30" +--- testing: 'abc' << 'a5.9' --- +string(2) "30" +--- testing: '123abc' << '0' --- +string(6) "313233" +--- testing: '123abc' << '65' --- +string(6) "323436" +--- testing: '123abc' << '-44' --- +string(18) "313238393734383438" +--- testing: '123abc' << '1.2' --- +string(6) "323436" +--- testing: '123abc' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: '123abc' << 'abc' --- +string(6) "313233" +--- testing: '123abc' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc' << '3.4a' --- +string(6) "393834" +--- testing: '123abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123e5' << '0' --- +string(6) "313233" +--- testing: '123e5' << '65' --- +string(6) "323436" +--- testing: '123e5' << '-44' --- +string(18) "313238393734383438" +--- testing: '123e5' << '1.2' --- +string(6) "323436" +--- testing: '123e5' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: '123e5' << 'abc' --- +string(6) "313233" +--- testing: '123e5' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5' << '3.4a' --- +string(6) "393834" +--- testing: '123e5' << 'a5.9' --- +string(6) "313233" +--- testing: '123e5xyz' << '0' --- +string(6) "313233" +--- testing: '123e5xyz' << '65' --- +string(6) "323436" +--- testing: '123e5xyz' << '-44' --- +string(18) "313238393734383438" +--- testing: '123e5xyz' << '1.2' --- +string(6) "323436" +--- testing: '123e5xyz' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: '123e5xyz' << 'abc' --- +string(6) "313233" +--- testing: '123e5xyz' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123e5xyz' << '3.4a' --- +string(6) "393834" +--- testing: '123e5xyz' << 'a5.9' --- +string(6) "313233" +--- testing: ' 123abc' << '0' --- +string(6) "313233" +--- testing: ' 123abc' << '65' --- +string(6) "323436" +--- testing: ' 123abc' << '-44' --- +string(18) "313238393734383438" +--- testing: ' 123abc' << '1.2' --- +string(6) "323436" +--- testing: ' 123abc' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: ' 123abc' << 'abc' --- +string(6) "313233" +--- testing: ' 123abc' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: ' 123abc' << '3.4a' --- +string(6) "393834" +--- testing: ' 123abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123 abc' << '0' --- +string(6) "313233" +--- testing: '123 abc' << '65' --- +string(6) "323436" +--- testing: '123 abc' << '-44' --- +string(18) "313238393734383438" +--- testing: '123 abc' << '1.2' --- +string(6) "323436" +--- testing: '123 abc' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: '123 abc' << 'abc' --- +string(6) "313233" +--- testing: '123 abc' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123 abc' << '3.4a' --- +string(6) "393834" +--- testing: '123 abc' << 'a5.9' --- +string(6) "313233" +--- testing: '123abc ' << '0' --- +string(6) "313233" +--- testing: '123abc ' << '65' --- +string(6) "323436" +--- testing: '123abc ' << '-44' --- +string(18) "313238393734383438" +--- testing: '123abc ' << '1.2' --- +string(6) "323436" +--- testing: '123abc ' << '-7.7' --- +string(38) "2d373230353735393430333739323739333630" +--- testing: '123abc ' << 'abc' --- +string(6) "313233" +--- testing: '123abc ' << '123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << '123e5' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << '123e5xyz' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << ' 123abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << '123 abc' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << '123abc ' --- +string(40) "2d32383832333033373631353137313137343430" +--- testing: '123abc ' << '3.4a' --- +string(6) "393834" +--- testing: '123abc ' << 'a5.9' --- +string(6) "313233" +--- testing: '3.4a' << '0' --- +string(2) "33" +--- testing: '3.4a' << '65' --- +string(2) "36" +--- testing: '3.4a' << '-44' --- +string(14) "33313435373238" +--- testing: '3.4a' << '1.2' --- +string(2) "36" +--- testing: '3.4a' << '-7.7' --- +string(36) "343332333435353634323237353637363136" +--- testing: '3.4a' << 'abc' --- +string(2) "33" +--- testing: '3.4a' << '123abc' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << '123e5' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << '123e5xyz' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << ' 123abc' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << '123 abc' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << '123abc ' --- +string(38) "31373239333832323536393130323730343634" +--- testing: '3.4a' << '3.4a' --- +string(4) "3234" +--- testing: '3.4a' << 'a5.9' --- +string(2) "33" +--- testing: 'a5.9' << '0' --- +string(2) "30" +--- testing: 'a5.9' << '65' --- +string(2) "30" +--- testing: 'a5.9' << '-44' --- +string(2) "30" +--- testing: 'a5.9' << '1.2' --- +string(2) "30" +--- testing: 'a5.9' << '-7.7' --- +string(2) "30" +--- testing: 'a5.9' << 'abc' --- +string(2) "30" +--- testing: 'a5.9' << '123abc' --- +string(2) "30" +--- testing: 'a5.9' << '123e5' --- +string(2) "30" +--- testing: 'a5.9' << '123e5xyz' --- +string(2) "30" +--- testing: 'a5.9' << ' 123abc' --- +string(2) "30" +--- testing: 'a5.9' << '123 abc' --- +string(2) "30" +--- testing: 'a5.9' << '123abc ' --- +string(2) "30" +--- testing: 'a5.9' << '3.4a' --- +string(2) "30" +--- testing: 'a5.9' << 'a5.9' --- +string(2) "30" +===DONE=== diff --git a/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt new file mode 100644 index 0000000..1029d19 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftRight_basiclong_64bit.phpt @@ -0,0 +1,583 @@ +--TEST-- +Test >> operator : 64bit long tests +--SKIPIF-- + +--FILE-- +> $otherVal ---\n"; + var_dump($longVal>>$otherVal); + } +} + +foreach ($otherVals as $otherVal) { + foreach($longVals as $longVal) { + echo "--- testing: $otherVal >> $longVal ---\n"; + var_dump($otherVal>>$longVal); + } +} + +?> +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 >> 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> 1 --- +int(4611686018427387903) +--- testing: 9223372036854775807 >> -1 --- +int(0) +--- testing: 9223372036854775807 >> 7 --- +int(72057594037927935) +--- testing: 9223372036854775807 >> 9 --- +int(18014398509481983) +--- testing: 9223372036854775807 >> 65 --- +int(4611686018427387903) +--- testing: 9223372036854775807 >> -44 --- +int(8796093022207) +--- testing: 9223372036854775807 >> 2147483647 --- +int(0) +--- testing: 9223372036854775807 >> 9223372036854775807 --- +int(0) +--- testing: -9223372036854775808 >> 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 >> 1 --- +int(-4611686018427387904) +--- testing: -9223372036854775808 >> -1 --- +int(-1) +--- testing: -9223372036854775808 >> 7 --- +int(-72057594037927936) +--- testing: -9223372036854775808 >> 9 --- +int(-18014398509481984) +--- testing: -9223372036854775808 >> 65 --- +int(-4611686018427387904) +--- testing: -9223372036854775808 >> -44 --- +int(-8796093022208) +--- testing: -9223372036854775808 >> 2147483647 --- +int(-1) +--- testing: -9223372036854775808 >> 9223372036854775807 --- +int(-1) +--- testing: 2147483647 >> 0 --- +int(2147483647) +--- testing: 2147483647 >> 1 --- +int(1073741823) +--- testing: 2147483647 >> -1 --- +int(0) +--- testing: 2147483647 >> 7 --- +int(16777215) +--- testing: 2147483647 >> 9 --- +int(4194303) +--- testing: 2147483647 >> 65 --- +int(1073741823) +--- testing: 2147483647 >> -44 --- +int(2047) +--- testing: 2147483647 >> 2147483647 --- +int(0) +--- testing: 2147483647 >> 9223372036854775807 --- +int(0) +--- testing: -2147483648 >> 0 --- +int(-2147483648) +--- testing: -2147483648 >> 1 --- +int(-1073741824) +--- testing: -2147483648 >> -1 --- +int(-1) +--- testing: -2147483648 >> 7 --- +int(-16777216) +--- testing: -2147483648 >> 9 --- +int(-4194304) +--- testing: -2147483648 >> 65 --- +int(-1073741824) +--- testing: -2147483648 >> -44 --- +int(-2048) +--- testing: -2147483648 >> 2147483647 --- +int(-1) +--- testing: -2147483648 >> 9223372036854775807 --- +int(-1) +--- testing: 9223372034707292160 >> 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 >> 1 --- +int(4611686017353646080) +--- testing: 9223372034707292160 >> -1 --- +int(0) +--- testing: 9223372034707292160 >> 7 --- +int(72057594021150720) +--- testing: 9223372034707292160 >> 9 --- +int(18014398505287680) +--- testing: 9223372034707292160 >> 65 --- +int(4611686017353646080) +--- testing: 9223372034707292160 >> -44 --- +int(8796093020160) +--- testing: 9223372034707292160 >> 2147483647 --- +int(0) +--- testing: 9223372034707292160 >> 9223372036854775807 --- +int(0) +--- testing: -9223372034707292160 >> 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 >> 1 --- +int(-4611686017353646080) +--- testing: -9223372034707292160 >> -1 --- +int(-1) +--- testing: -9223372034707292160 >> 7 --- +int(-72057594021150720) +--- testing: -9223372034707292160 >> 9 --- +int(-18014398505287680) +--- testing: -9223372034707292160 >> 65 --- +int(-4611686017353646080) +--- testing: -9223372034707292160 >> -44 --- +int(-8796093020160) +--- testing: -9223372034707292160 >> 2147483647 --- +int(-1) +--- testing: -9223372034707292160 >> 9223372036854775807 --- +int(-1) +--- testing: 2147483648 >> 0 --- +int(2147483648) +--- testing: 2147483648 >> 1 --- +int(1073741824) +--- testing: 2147483648 >> -1 --- +int(0) +--- testing: 2147483648 >> 7 --- +int(16777216) +--- testing: 2147483648 >> 9 --- +int(4194304) +--- testing: 2147483648 >> 65 --- +int(1073741824) +--- testing: 2147483648 >> -44 --- +int(2048) +--- testing: 2147483648 >> 2147483647 --- +int(0) +--- testing: 2147483648 >> 9223372036854775807 --- +int(0) +--- testing: -2147483649 >> 0 --- +int(-2147483649) +--- testing: -2147483649 >> 1 --- +int(-1073741825) +--- testing: -2147483649 >> -1 --- +int(-1) +--- testing: -2147483649 >> 7 --- +int(-16777217) +--- testing: -2147483649 >> 9 --- +int(-4194305) +--- testing: -2147483649 >> 65 --- +int(-1073741825) +--- testing: -2147483649 >> -44 --- +int(-2049) +--- testing: -2147483649 >> 2147483647 --- +int(-1) +--- testing: -2147483649 >> 9223372036854775807 --- +int(-1) +--- testing: 4294967294 >> 0 --- +int(4294967294) +--- testing: 4294967294 >> 1 --- +int(2147483647) +--- testing: 4294967294 >> -1 --- +int(0) +--- testing: 4294967294 >> 7 --- +int(33554431) +--- testing: 4294967294 >> 9 --- +int(8388607) +--- testing: 4294967294 >> 65 --- +int(2147483647) +--- testing: 4294967294 >> -44 --- +int(4095) +--- testing: 4294967294 >> 2147483647 --- +int(0) +--- testing: 4294967294 >> 9223372036854775807 --- +int(0) +--- testing: 4294967295 >> 0 --- +int(4294967295) +--- testing: 4294967295 >> 1 --- +int(2147483647) +--- testing: 4294967295 >> -1 --- +int(0) +--- testing: 4294967295 >> 7 --- +int(33554431) +--- testing: 4294967295 >> 9 --- +int(8388607) +--- testing: 4294967295 >> 65 --- +int(2147483647) +--- testing: 4294967295 >> -44 --- +int(4095) +--- testing: 4294967295 >> 2147483647 --- +int(0) +--- testing: 4294967295 >> 9223372036854775807 --- +int(0) +--- testing: 4294967293 >> 0 --- +int(4294967293) +--- testing: 4294967293 >> 1 --- +int(2147483646) +--- testing: 4294967293 >> -1 --- +int(0) +--- testing: 4294967293 >> 7 --- +int(33554431) +--- testing: 4294967293 >> 9 --- +int(8388607) +--- testing: 4294967293 >> 65 --- +int(2147483646) +--- testing: 4294967293 >> -44 --- +int(4095) +--- testing: 4294967293 >> 2147483647 --- +int(0) +--- testing: 4294967293 >> 9223372036854775807 --- +int(0) +--- testing: 9223372036854775806 >> 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 >> 1 --- +int(4611686018427387903) +--- testing: 9223372036854775806 >> -1 --- +int(0) +--- testing: 9223372036854775806 >> 7 --- +int(72057594037927935) +--- testing: 9223372036854775806 >> 9 --- +int(18014398509481983) +--- testing: 9223372036854775806 >> 65 --- +int(4611686018427387903) +--- testing: 9223372036854775806 >> -44 --- +int(8796093022207) +--- testing: 9223372036854775806 >> 2147483647 --- +int(0) +--- testing: 9223372036854775806 >> 9223372036854775807 --- +int(0) +--- testing: 9.2233720368548E+18 >> 0 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 >> 1 --- +int(-4611686018427387904) +--- testing: 9.2233720368548E+18 >> -1 --- +int(-1) +--- testing: 9.2233720368548E+18 >> 7 --- +int(-72057594037927936) +--- testing: 9.2233720368548E+18 >> 9 --- +int(-18014398509481984) +--- testing: 9.2233720368548E+18 >> 65 --- +int(-4611686018427387904) +--- testing: 9.2233720368548E+18 >> -44 --- +int(-8796093022208) +--- testing: 9.2233720368548E+18 >> 2147483647 --- +int(-1) +--- testing: 9.2233720368548E+18 >> 9223372036854775807 --- +int(-1) +--- testing: -9223372036854775807 >> 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 >> 1 --- +int(-4611686018427387904) +--- testing: -9223372036854775807 >> -1 --- +int(-1) +--- testing: -9223372036854775807 >> 7 --- +int(-72057594037927936) +--- testing: -9223372036854775807 >> 9 --- +int(-18014398509481984) +--- testing: -9223372036854775807 >> 65 --- +int(-4611686018427387904) +--- testing: -9223372036854775807 >> -44 --- +int(-8796093022208) +--- testing: -9223372036854775807 >> 2147483647 --- +int(-1) +--- testing: -9223372036854775807 >> 9223372036854775807 --- +int(-1) +--- testing: -9.2233720368548E+18 >> 0 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 >> 1 --- +int(-4611686018427387904) +--- testing: -9.2233720368548E+18 >> -1 --- +int(-1) +--- testing: -9.2233720368548E+18 >> 7 --- +int(-72057594037927936) +--- testing: -9.2233720368548E+18 >> 9 --- +int(-18014398509481984) +--- testing: -9.2233720368548E+18 >> 65 --- +int(-4611686018427387904) +--- testing: -9.2233720368548E+18 >> -44 --- +int(-8796093022208) +--- testing: -9.2233720368548E+18 >> 2147483647 --- +int(-1) +--- testing: -9.2233720368548E+18 >> 9223372036854775807 --- +int(-1) +--- testing: 0 >> 9223372036854775807 --- +int(0) +--- testing: 0 >> -9223372036854775808 --- +int(0) +--- testing: 0 >> 2147483647 --- +int(0) +--- testing: 0 >> -2147483648 --- +int(0) +--- testing: 0 >> 9223372034707292160 --- +int(0) +--- testing: 0 >> -9223372034707292160 --- +int(0) +--- testing: 0 >> 2147483648 --- +int(0) +--- testing: 0 >> -2147483649 --- +int(0) +--- testing: 0 >> 4294967294 --- +int(0) +--- testing: 0 >> 4294967295 --- +int(0) +--- testing: 0 >> 4294967293 --- +int(0) +--- testing: 0 >> 9223372036854775806 --- +int(0) +--- testing: 0 >> 9.2233720368548E+18 --- +int(0) +--- testing: 0 >> -9223372036854775807 --- +int(0) +--- testing: 0 >> -9.2233720368548E+18 --- +int(0) +--- testing: 1 >> 9223372036854775807 --- +int(0) +--- testing: 1 >> -9223372036854775808 --- +int(1) +--- testing: 1 >> 2147483647 --- +int(0) +--- testing: 1 >> -2147483648 --- +int(1) +--- testing: 1 >> 9223372034707292160 --- +int(1) +--- testing: 1 >> -9223372034707292160 --- +int(1) +--- testing: 1 >> 2147483648 --- +int(1) +--- testing: 1 >> -2147483649 --- +int(0) +--- testing: 1 >> 4294967294 --- +int(0) +--- testing: 1 >> 4294967295 --- +int(0) +--- testing: 1 >> 4294967293 --- +int(0) +--- testing: 1 >> 9223372036854775806 --- +int(0) +--- testing: 1 >> 9.2233720368548E+18 --- +int(1) +--- testing: 1 >> -9223372036854775807 --- +int(0) +--- testing: 1 >> -9.2233720368548E+18 --- +int(1) +--- testing: -1 >> 9223372036854775807 --- +int(-1) +--- testing: -1 >> -9223372036854775808 --- +int(-1) +--- testing: -1 >> 2147483647 --- +int(-1) +--- testing: -1 >> -2147483648 --- +int(-1) +--- testing: -1 >> 9223372034707292160 --- +int(-1) +--- testing: -1 >> -9223372034707292160 --- +int(-1) +--- testing: -1 >> 2147483648 --- +int(-1) +--- testing: -1 >> -2147483649 --- +int(-1) +--- testing: -1 >> 4294967294 --- +int(-1) +--- testing: -1 >> 4294967295 --- +int(-1) +--- testing: -1 >> 4294967293 --- +int(-1) +--- testing: -1 >> 9223372036854775806 --- +int(-1) +--- testing: -1 >> 9.2233720368548E+18 --- +int(-1) +--- testing: -1 >> -9223372036854775807 --- +int(-1) +--- testing: -1 >> -9.2233720368548E+18 --- +int(-1) +--- testing: 7 >> 9223372036854775807 --- +int(0) +--- testing: 7 >> -9223372036854775808 --- +int(7) +--- testing: 7 >> 2147483647 --- +int(0) +--- testing: 7 >> -2147483648 --- +int(7) +--- testing: 7 >> 9223372034707292160 --- +int(7) +--- testing: 7 >> -9223372034707292160 --- +int(7) +--- testing: 7 >> 2147483648 --- +int(7) +--- testing: 7 >> -2147483649 --- +int(0) +--- testing: 7 >> 4294967294 --- +int(0) +--- testing: 7 >> 4294967295 --- +int(0) +--- testing: 7 >> 4294967293 --- +int(0) +--- testing: 7 >> 9223372036854775806 --- +int(0) +--- testing: 7 >> 9.2233720368548E+18 --- +int(7) +--- testing: 7 >> -9223372036854775807 --- +int(3) +--- testing: 7 >> -9.2233720368548E+18 --- +int(7) +--- testing: 9 >> 9223372036854775807 --- +int(0) +--- testing: 9 >> -9223372036854775808 --- +int(9) +--- testing: 9 >> 2147483647 --- +int(0) +--- testing: 9 >> -2147483648 --- +int(9) +--- testing: 9 >> 9223372034707292160 --- +int(9) +--- testing: 9 >> -9223372034707292160 --- +int(9) +--- testing: 9 >> 2147483648 --- +int(9) +--- testing: 9 >> -2147483649 --- +int(0) +--- testing: 9 >> 4294967294 --- +int(0) +--- testing: 9 >> 4294967295 --- +int(0) +--- testing: 9 >> 4294967293 --- +int(0) +--- testing: 9 >> 9223372036854775806 --- +int(0) +--- testing: 9 >> 9.2233720368548E+18 --- +int(9) +--- testing: 9 >> -9223372036854775807 --- +int(4) +--- testing: 9 >> -9.2233720368548E+18 --- +int(9) +--- testing: 65 >> 9223372036854775807 --- +int(0) +--- testing: 65 >> -9223372036854775808 --- +int(65) +--- testing: 65 >> 2147483647 --- +int(0) +--- testing: 65 >> -2147483648 --- +int(65) +--- testing: 65 >> 9223372034707292160 --- +int(65) +--- testing: 65 >> -9223372034707292160 --- +int(65) +--- testing: 65 >> 2147483648 --- +int(65) +--- testing: 65 >> -2147483649 --- +int(0) +--- testing: 65 >> 4294967294 --- +int(0) +--- testing: 65 >> 4294967295 --- +int(0) +--- testing: 65 >> 4294967293 --- +int(0) +--- testing: 65 >> 9223372036854775806 --- +int(0) +--- testing: 65 >> 9.2233720368548E+18 --- +int(65) +--- testing: 65 >> -9223372036854775807 --- +int(32) +--- testing: 65 >> -9.2233720368548E+18 --- +int(65) +--- testing: -44 >> 9223372036854775807 --- +int(-1) +--- testing: -44 >> -9223372036854775808 --- +int(-44) +--- testing: -44 >> 2147483647 --- +int(-1) +--- testing: -44 >> -2147483648 --- +int(-44) +--- testing: -44 >> 9223372034707292160 --- +int(-44) +--- testing: -44 >> -9223372034707292160 --- +int(-44) +--- testing: -44 >> 2147483648 --- +int(-44) +--- testing: -44 >> -2147483649 --- +int(-1) +--- testing: -44 >> 4294967294 --- +int(-1) +--- testing: -44 >> 4294967295 --- +int(-1) +--- testing: -44 >> 4294967293 --- +int(-1) +--- testing: -44 >> 9223372036854775806 --- +int(-1) +--- testing: -44 >> 9.2233720368548E+18 --- +int(-44) +--- testing: -44 >> -9223372036854775807 --- +int(-22) +--- testing: -44 >> -9.2233720368548E+18 --- +int(-44) +--- testing: 2147483647 >> 9223372036854775807 --- +int(0) +--- testing: 2147483647 >> -9223372036854775808 --- +int(2147483647) +--- testing: 2147483647 >> 2147483647 --- +int(0) +--- testing: 2147483647 >> -2147483648 --- +int(2147483647) +--- testing: 2147483647 >> 9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 >> -9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 >> 2147483648 --- +int(2147483647) +--- testing: 2147483647 >> -2147483649 --- +int(0) +--- testing: 2147483647 >> 4294967294 --- +int(0) +--- testing: 2147483647 >> 4294967295 --- +int(0) +--- testing: 2147483647 >> 4294967293 --- +int(0) +--- testing: 2147483647 >> 9223372036854775806 --- +int(0) +--- testing: 2147483647 >> 9.2233720368548E+18 --- +int(2147483647) +--- testing: 2147483647 >> -9223372036854775807 --- +int(1073741823) +--- testing: 2147483647 >> -9.2233720368548E+18 --- +int(2147483647) +--- testing: 9223372036854775807 >> 9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 >> -9223372036854775808 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> 2147483647 --- +int(0) +--- testing: 9223372036854775807 >> -2147483648 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> 9223372034707292160 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> -9223372034707292160 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> 2147483648 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> -2147483649 --- +int(0) +--- testing: 9223372036854775807 >> 4294967294 --- +int(1) +--- testing: 9223372036854775807 >> 4294967295 --- +int(0) +--- testing: 9223372036854775807 >> 4294967293 --- +int(3) +--- testing: 9223372036854775807 >> 9223372036854775806 --- +int(1) +--- testing: 9223372036854775807 >> 9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: 9223372036854775807 >> -9223372036854775807 --- +int(4611686018427387903) +--- testing: 9223372036854775807 >> -9.2233720368548E+18 --- +int(9223372036854775807) +===DONE=== + \ No newline at end of file diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt new file mode 100644 index 0000000..9518d42 --- /dev/null +++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test >> operator : various numbers as strings +--FILE-- +> '$otherVal' ---\n"; + var_dump(bin2hex($strVal>>$otherVal)); + } +} + + +?> +===DONE=== +--EXPECT-- +--- testing: '0' >> '0' --- +string(2) "30" +--- testing: '0' >> '65' --- +string(2) "30" +--- testing: '0' >> '-44' --- +string(2) "30" +--- testing: '0' >> '1.2' --- +string(2) "30" +--- testing: '0' >> '-7.7' --- +string(2) "30" +--- testing: '0' >> 'abc' --- +string(2) "30" +--- testing: '0' >> '123abc' --- +string(2) "30" +--- testing: '0' >> '123e5' --- +string(2) "30" +--- testing: '0' >> '123e5xyz' --- +string(2) "30" +--- testing: '0' >> ' 123abc' --- +string(2) "30" +--- testing: '0' >> '123 abc' --- +string(2) "30" +--- testing: '0' >> '123abc ' --- +string(2) "30" +--- testing: '0' >> '3.4a' --- +string(2) "30" +--- testing: '0' >> 'a5.9' --- +string(2) "30" +--- testing: '65' >> '0' --- +string(4) "3635" +--- testing: '65' >> '65' --- +string(4) "3332" +--- testing: '65' >> '-44' --- +string(2) "30" +--- testing: '65' >> '1.2' --- +string(4) "3332" +--- testing: '65' >> '-7.7' --- +string(2) "30" +--- testing: '65' >> 'abc' --- +string(4) "3635" +--- testing: '65' >> '123abc' --- +string(2) "30" +--- testing: '65' >> '123e5' --- +string(2) "30" +--- testing: '65' >> '123e5xyz' --- +string(2) "30" +--- testing: '65' >> ' 123abc' --- +string(2) "30" +--- testing: '65' >> '123 abc' --- +string(2) "30" +--- testing: '65' >> '123abc ' --- +string(2) "30" +--- testing: '65' >> '3.4a' --- +string(2) "38" +--- testing: '65' >> 'a5.9' --- +string(4) "3635" +--- testing: '-44' >> '0' --- +string(6) "2d3434" +--- testing: '-44' >> '65' --- +string(6) "2d3232" +--- testing: '-44' >> '-44' --- +string(4) "2d31" +--- testing: '-44' >> '1.2' --- +string(6) "2d3232" +--- testing: '-44' >> '-7.7' --- +string(4) "2d31" +--- testing: '-44' >> 'abc' --- +string(6) "2d3434" +--- testing: '-44' >> '123abc' --- +string(4) "2d31" +--- testing: '-44' >> '123e5' --- +string(4) "2d31" +--- testing: '-44' >> '123e5xyz' --- +string(4) "2d31" +--- testing: '-44' >> ' 123abc' --- +string(4) "2d31" +--- testing: '-44' >> '123 abc' --- +string(4) "2d31" +--- testing: '-44' >> '123abc ' --- +string(4) "2d31" +--- testing: '-44' >> '3.4a' --- +string(4) "2d36" +--- testing: '-44' >> 'a5.9' --- +string(6) "2d3434" +--- testing: '1.2' >> '0' --- +string(2) "31" +--- testing: '1.2' >> '65' --- +string(2) "30" +--- testing: '1.2' >> '-44' --- +string(2) "30" +--- testing: '1.2' >> '1.2' --- +string(2) "30" +--- testing: '1.2' >> '-7.7' --- +string(2) "30" +--- testing: '1.2' >> 'abc' --- +string(2) "31" +--- testing: '1.2' >> '123abc' --- +string(2) "30" +--- testing: '1.2' >> '123e5' --- +string(2) "30" +--- testing: '1.2' >> '123e5xyz' --- +string(2) "30" +--- testing: '1.2' >> ' 123abc' --- +string(2) "30" +--- testing: '1.2' >> '123 abc' --- +string(2) "30" +--- testing: '1.2' >> '123abc ' --- +string(2) "30" +--- testing: '1.2' >> '3.4a' --- +string(2) "30" +--- testing: '1.2' >> 'a5.9' --- +string(2) "31" +--- testing: '-7.7' >> '0' --- +string(4) "2d37" +--- testing: '-7.7' >> '65' --- +string(4) "2d34" +--- testing: '-7.7' >> '-44' --- +string(4) "2d31" +--- testing: '-7.7' >> '1.2' --- +string(4) "2d34" +--- testing: '-7.7' >> '-7.7' --- +string(4) "2d31" +--- testing: '-7.7' >> 'abc' --- +string(4) "2d37" +--- testing: '-7.7' >> '123abc' --- +string(4) "2d31" +--- testing: '-7.7' >> '123e5' --- +string(4) "2d31" +--- testing: '-7.7' >> '123e5xyz' --- +string(4) "2d31" +--- testing: '-7.7' >> ' 123abc' --- +string(4) "2d31" +--- testing: '-7.7' >> '123 abc' --- +string(4) "2d31" +--- testing: '-7.7' >> '123abc ' --- +string(4) "2d31" +--- testing: '-7.7' >> '3.4a' --- +string(4) "2d31" +--- testing: '-7.7' >> 'a5.9' --- +string(4) "2d37" +--- testing: 'abc' >> '0' --- +string(2) "30" +--- testing: 'abc' >> '65' --- +string(2) "30" +--- testing: 'abc' >> '-44' --- +string(2) "30" +--- testing: 'abc' >> '1.2' --- +string(2) "30" +--- testing: 'abc' >> '-7.7' --- +string(2) "30" +--- testing: 'abc' >> 'abc' --- +string(2) "30" +--- testing: 'abc' >> '123abc' --- +string(2) "30" +--- testing: 'abc' >> '123e5' --- +string(2) "30" +--- testing: 'abc' >> '123e5xyz' --- +string(2) "30" +--- testing: 'abc' >> ' 123abc' --- +string(2) "30" +--- testing: 'abc' >> '123 abc' --- +string(2) "30" +--- testing: 'abc' >> '123abc ' --- +string(2) "30" +--- testing: 'abc' >> '3.4a' --- +string(2) "30" +--- testing: 'abc' >> 'a5.9' --- +string(2) "30" +--- testing: '123abc' >> '0' --- +string(6) "313233" +--- testing: '123abc' >> '65' --- +string(4) "3631" +--- testing: '123abc' >> '-44' --- +string(2) "30" +--- testing: '123abc' >> '1.2' --- +string(4) "3631" +--- testing: '123abc' >> '-7.7' --- +string(2) "30" +--- testing: '123abc' >> 'abc' --- +string(6) "313233" +--- testing: '123abc' >> '123abc' --- +string(2) "30" +--- testing: '123abc' >> '123e5' --- +string(2) "30" +--- testing: '123abc' >> '123e5xyz' --- +string(2) "30" +--- testing: '123abc' >> ' 123abc' --- +string(2) "30" +--- testing: '123abc' >> '123 abc' --- +string(2) "30" +--- testing: '123abc' >> '123abc ' --- +string(2) "30" +--- testing: '123abc' >> '3.4a' --- +string(4) "3135" +--- testing: '123abc' >> 'a5.9' --- +string(6) "313233" +--- testing: '123e5' >> '0' --- +string(6) "313233" +--- testing: '123e5' >> '65' --- +string(4) "3631" +--- testing: '123e5' >> '-44' --- +string(2) "30" +--- testing: '123e5' >> '1.2' --- +string(4) "3631" +--- testing: '123e5' >> '-7.7' --- +string(2) "30" +--- testing: '123e5' >> 'abc' --- +string(6) "313233" +--- testing: '123e5' >> '123abc' --- +string(2) "30" +--- testing: '123e5' >> '123e5' --- +string(2) "30" +--- testing: '123e5' >> '123e5xyz' --- +string(2) "30" +--- testing: '123e5' >> ' 123abc' --- +string(2) "30" +--- testing: '123e5' >> '123 abc' --- +string(2) "30" +--- testing: '123e5' >> '123abc ' --- +string(2) "30" +--- testing: '123e5' >> '3.4a' --- +string(4) "3135" +--- testing: '123e5' >> 'a5.9' --- +string(6) "313233" +--- testing: '123e5xyz' >> '0' --- +string(6) "313233" +--- testing: '123e5xyz' >> '65' --- +string(4) "3631" +--- testing: '123e5xyz' >> '-44' --- +string(2) "30" +--- testing: '123e5xyz' >> '1.2' --- +string(4) "3631" +--- testing: '123e5xyz' >> '-7.7' --- +string(2) "30" +--- testing: '123e5xyz' >> 'abc' --- +string(6) "313233" +--- testing: '123e5xyz' >> '123abc' --- +string(2) "30" +--- testing: '123e5xyz' >> '123e5' --- +string(2) "30" +--- testing: '123e5xyz' >> '123e5xyz' --- +string(2) "30" +--- testing: '123e5xyz' >> ' 123abc' --- +string(2) "30" +--- testing: '123e5xyz' >> '123 abc' --- +string(2) "30" +--- testing: '123e5xyz' >> '123abc ' --- +string(2) "30" +--- testing: '123e5xyz' >> '3.4a' --- +string(4) "3135" +--- testing: '123e5xyz' >> 'a5.9' --- +string(6) "313233" +--- testing: ' 123abc' >> '0' --- +string(6) "313233" +--- testing: ' 123abc' >> '65' --- +string(4) "3631" +--- testing: ' 123abc' >> '-44' --- +string(2) "30" +--- testing: ' 123abc' >> '1.2' --- +string(4) "3631" +--- testing: ' 123abc' >> '-7.7' --- +string(2) "30" +--- testing: ' 123abc' >> 'abc' --- +string(6) "313233" +--- testing: ' 123abc' >> '123abc' --- +string(2) "30" +--- testing: ' 123abc' >> '123e5' --- +string(2) "30" +--- testing: ' 123abc' >> '123e5xyz' --- +string(2) "30" +--- testing: ' 123abc' >> ' 123abc' --- +string(2) "30" +--- testing: ' 123abc' >> '123 abc' --- +string(2) "30" +--- testing: ' 123abc' >> '123abc ' --- +string(2) "30" +--- testing: ' 123abc' >> '3.4a' --- +string(4) "3135" +--- testing: ' 123abc' >> 'a5.9' --- +string(6) "313233" +--- testing: '123 abc' >> '0' --- +string(6) "313233" +--- testing: '123 abc' >> '65' --- +string(4) "3631" +--- testing: '123 abc' >> '-44' --- +string(2) "30" +--- testing: '123 abc' >> '1.2' --- +string(4) "3631" +--- testing: '123 abc' >> '-7.7' --- +string(2) "30" +--- testing: '123 abc' >> 'abc' --- +string(6) "313233" +--- testing: '123 abc' >> '123abc' --- +string(2) "30" +--- testing: '123 abc' >> '123e5' --- +string(2) "30" +--- testing: '123 abc' >> '123e5xyz' --- +string(2) "30" +--- testing: '123 abc' >> ' 123abc' --- +string(2) "30" +--- testing: '123 abc' >> '123 abc' --- +string(2) "30" +--- testing: '123 abc' >> '123abc ' --- +string(2) "30" +--- testing: '123 abc' >> '3.4a' --- +string(4) "3135" +--- testing: '123 abc' >> 'a5.9' --- +string(6) "313233" +--- testing: '123abc ' >> '0' --- +string(6) "313233" +--- testing: '123abc ' >> '65' --- +string(4) "3631" +--- testing: '123abc ' >> '-44' --- +string(2) "30" +--- testing: '123abc ' >> '1.2' --- +string(4) "3631" +--- testing: '123abc ' >> '-7.7' --- +string(2) "30" +--- testing: '123abc ' >> 'abc' --- +string(6) "313233" +--- testing: '123abc ' >> '123abc' --- +string(2) "30" +--- testing: '123abc ' >> '123e5' --- +string(2) "30" +--- testing: '123abc ' >> '123e5xyz' --- +string(2) "30" +--- testing: '123abc ' >> ' 123abc' --- +string(2) "30" +--- testing: '123abc ' >> '123 abc' --- +string(2) "30" +--- testing: '123abc ' >> '123abc ' --- +string(2) "30" +--- testing: '123abc ' >> '3.4a' --- +string(4) "3135" +--- testing: '123abc ' >> 'a5.9' --- +string(6) "313233" +--- testing: '3.4a' >> '0' --- +string(2) "33" +--- testing: '3.4a' >> '65' --- +string(2) "31" +--- testing: '3.4a' >> '-44' --- +string(2) "30" +--- testing: '3.4a' >> '1.2' --- +string(2) "31" +--- testing: '3.4a' >> '-7.7' --- +string(2) "30" +--- testing: '3.4a' >> 'abc' --- +string(2) "33" +--- testing: '3.4a' >> '123abc' --- +string(2) "30" +--- testing: '3.4a' >> '123e5' --- +string(2) "30" +--- testing: '3.4a' >> '123e5xyz' --- +string(2) "30" +--- testing: '3.4a' >> ' 123abc' --- +string(2) "30" +--- testing: '3.4a' >> '123 abc' --- +string(2) "30" +--- testing: '3.4a' >> '123abc ' --- +string(2) "30" +--- testing: '3.4a' >> '3.4a' --- +string(2) "30" +--- testing: '3.4a' >> 'a5.9' --- +string(2) "33" +--- testing: 'a5.9' >> '0' --- +string(2) "30" +--- testing: 'a5.9' >> '65' --- +string(2) "30" +--- testing: 'a5.9' >> '-44' --- +string(2) "30" +--- testing: 'a5.9' >> '1.2' --- +string(2) "30" +--- testing: 'a5.9' >> '-7.7' --- +string(2) "30" +--- testing: 'a5.9' >> 'abc' --- +string(2) "30" +--- testing: 'a5.9' >> '123abc' --- +string(2) "30" +--- testing: 'a5.9' >> '123e5' --- +string(2) "30" +--- testing: 'a5.9' >> '123e5xyz' --- +string(2) "30" +--- testing: 'a5.9' >> ' 123abc' --- +string(2) "30" +--- testing: 'a5.9' >> '123 abc' --- +string(2) "30" +--- testing: 'a5.9' >> '123abc ' --- +string(2) "30" +--- testing: 'a5.9' >> '3.4a' --- +string(2) "30" +--- testing: 'a5.9' >> 'a5.9' --- +string(2) "30" +===DONE=== diff --git a/tests/lang/operators/bitwiseXor_basiclong_64bit.phpt b/tests/lang/operators/bitwiseXor_basiclong_64bit.phpt new file mode 100644 index 0000000..2764be6 --- /dev/null +++ b/tests/lang/operators/bitwiseXor_basiclong_64bit.phpt @@ -0,0 +1,583 @@ +--TEST-- +Test ^ operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 ^ 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 ^ 1 --- +int(9223372036854775806) +--- testing: 9223372036854775807 ^ -1 --- +int(-9223372036854775808) +--- testing: 9223372036854775807 ^ 7 --- +int(9223372036854775800) +--- testing: 9223372036854775807 ^ 9 --- +int(9223372036854775798) +--- testing: 9223372036854775807 ^ 65 --- +int(9223372036854775742) +--- testing: 9223372036854775807 ^ -44 --- +int(-9223372036854775765) +--- testing: 9223372036854775807 ^ 2147483647 --- +int(9223372034707292160) +--- testing: 9223372036854775807 ^ 9223372036854775807 --- +int(0) +--- testing: -9223372036854775808 ^ 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 ^ 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775808 ^ -1 --- +int(9223372036854775807) +--- testing: -9223372036854775808 ^ 7 --- +int(-9223372036854775801) +--- testing: -9223372036854775808 ^ 9 --- +int(-9223372036854775799) +--- testing: -9223372036854775808 ^ 65 --- +int(-9223372036854775743) +--- testing: -9223372036854775808 ^ -44 --- +int(9223372036854775764) +--- testing: -9223372036854775808 ^ 2147483647 --- +int(-9223372034707292161) +--- testing: -9223372036854775808 ^ 9223372036854775807 --- +int(-1) +--- testing: 2147483647 ^ 0 --- +int(2147483647) +--- testing: 2147483647 ^ 1 --- +int(2147483646) +--- testing: 2147483647 ^ -1 --- +int(-2147483648) +--- testing: 2147483647 ^ 7 --- +int(2147483640) +--- testing: 2147483647 ^ 9 --- +int(2147483638) +--- testing: 2147483647 ^ 65 --- +int(2147483582) +--- testing: 2147483647 ^ -44 --- +int(-2147483605) +--- testing: 2147483647 ^ 2147483647 --- +int(0) +--- testing: 2147483647 ^ 9223372036854775807 --- +int(9223372034707292160) +--- testing: -2147483648 ^ 0 --- +int(-2147483648) +--- testing: -2147483648 ^ 1 --- +int(-2147483647) +--- testing: -2147483648 ^ -1 --- +int(2147483647) +--- testing: -2147483648 ^ 7 --- +int(-2147483641) +--- testing: -2147483648 ^ 9 --- +int(-2147483639) +--- testing: -2147483648 ^ 65 --- +int(-2147483583) +--- testing: -2147483648 ^ -44 --- +int(2147483604) +--- testing: -2147483648 ^ 2147483647 --- +int(-1) +--- testing: -2147483648 ^ 9223372036854775807 --- +int(-9223372034707292161) +--- testing: 9223372034707292160 ^ 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 ^ 1 --- +int(9223372034707292161) +--- testing: 9223372034707292160 ^ -1 --- +int(-9223372034707292161) +--- testing: 9223372034707292160 ^ 7 --- +int(9223372034707292167) +--- testing: 9223372034707292160 ^ 9 --- +int(9223372034707292169) +--- testing: 9223372034707292160 ^ 65 --- +int(9223372034707292225) +--- testing: 9223372034707292160 ^ -44 --- +int(-9223372034707292204) +--- testing: 9223372034707292160 ^ 2147483647 --- +int(9223372036854775807) +--- testing: 9223372034707292160 ^ 9223372036854775807 --- +int(2147483647) +--- testing: -9223372034707292160 ^ 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 ^ 1 --- +int(-9223372034707292159) +--- testing: -9223372034707292160 ^ -1 --- +int(9223372034707292159) +--- testing: -9223372034707292160 ^ 7 --- +int(-9223372034707292153) +--- testing: -9223372034707292160 ^ 9 --- +int(-9223372034707292151) +--- testing: -9223372034707292160 ^ 65 --- +int(-9223372034707292095) +--- testing: -9223372034707292160 ^ -44 --- +int(9223372034707292116) +--- testing: -9223372034707292160 ^ 2147483647 --- +int(-9223372032559808513) +--- testing: -9223372034707292160 ^ 9223372036854775807 --- +int(-2147483649) +--- testing: 2147483648 ^ 0 --- +int(2147483648) +--- testing: 2147483648 ^ 1 --- +int(2147483649) +--- testing: 2147483648 ^ -1 --- +int(-2147483649) +--- testing: 2147483648 ^ 7 --- +int(2147483655) +--- testing: 2147483648 ^ 9 --- +int(2147483657) +--- testing: 2147483648 ^ 65 --- +int(2147483713) +--- testing: 2147483648 ^ -44 --- +int(-2147483692) +--- testing: 2147483648 ^ 2147483647 --- +int(4294967295) +--- testing: 2147483648 ^ 9223372036854775807 --- +int(9223372034707292159) +--- testing: -2147483649 ^ 0 --- +int(-2147483649) +--- testing: -2147483649 ^ 1 --- +int(-2147483650) +--- testing: -2147483649 ^ -1 --- +int(2147483648) +--- testing: -2147483649 ^ 7 --- +int(-2147483656) +--- testing: -2147483649 ^ 9 --- +int(-2147483658) +--- testing: -2147483649 ^ 65 --- +int(-2147483714) +--- testing: -2147483649 ^ -44 --- +int(2147483691) +--- testing: -2147483649 ^ 2147483647 --- +int(-4294967296) +--- testing: -2147483649 ^ 9223372036854775807 --- +int(-9223372034707292160) +--- testing: 4294967294 ^ 0 --- +int(4294967294) +--- testing: 4294967294 ^ 1 --- +int(4294967295) +--- testing: 4294967294 ^ -1 --- +int(-4294967295) +--- testing: 4294967294 ^ 7 --- +int(4294967289) +--- testing: 4294967294 ^ 9 --- +int(4294967287) +--- testing: 4294967294 ^ 65 --- +int(4294967231) +--- testing: 4294967294 ^ -44 --- +int(-4294967254) +--- testing: 4294967294 ^ 2147483647 --- +int(2147483649) +--- testing: 4294967294 ^ 9223372036854775807 --- +int(9223372032559808513) +--- testing: 4294967295 ^ 0 --- +int(4294967295) +--- testing: 4294967295 ^ 1 --- +int(4294967294) +--- testing: 4294967295 ^ -1 --- +int(-4294967296) +--- testing: 4294967295 ^ 7 --- +int(4294967288) +--- testing: 4294967295 ^ 9 --- +int(4294967286) +--- testing: 4294967295 ^ 65 --- +int(4294967230) +--- testing: 4294967295 ^ -44 --- +int(-4294967253) +--- testing: 4294967295 ^ 2147483647 --- +int(2147483648) +--- testing: 4294967295 ^ 9223372036854775807 --- +int(9223372032559808512) +--- testing: 4294967293 ^ 0 --- +int(4294967293) +--- testing: 4294967293 ^ 1 --- +int(4294967292) +--- testing: 4294967293 ^ -1 --- +int(-4294967294) +--- testing: 4294967293 ^ 7 --- +int(4294967290) +--- testing: 4294967293 ^ 9 --- +int(4294967284) +--- testing: 4294967293 ^ 65 --- +int(4294967228) +--- testing: 4294967293 ^ -44 --- +int(-4294967255) +--- testing: 4294967293 ^ 2147483647 --- +int(2147483650) +--- testing: 4294967293 ^ 9223372036854775807 --- +int(9223372032559808514) +--- testing: 9223372036854775806 ^ 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 ^ 1 --- +int(9223372036854775807) +--- testing: 9223372036854775806 ^ -1 --- +int(-9223372036854775807) +--- testing: 9223372036854775806 ^ 7 --- +int(9223372036854775801) +--- testing: 9223372036854775806 ^ 9 --- +int(9223372036854775799) +--- testing: 9223372036854775806 ^ 65 --- +int(9223372036854775743) +--- testing: 9223372036854775806 ^ -44 --- +int(-9223372036854775766) +--- testing: 9223372036854775806 ^ 2147483647 --- +int(9223372034707292161) +--- testing: 9223372036854775806 ^ 9223372036854775807 --- +int(1) +--- testing: 9.2233720368548E+18 ^ 0 --- +int(-9223372036854775808) +--- testing: 9.2233720368548E+18 ^ 1 --- +int(-9223372036854775807) +--- testing: 9.2233720368548E+18 ^ -1 --- +int(9223372036854775807) +--- testing: 9.2233720368548E+18 ^ 7 --- +int(-9223372036854775801) +--- testing: 9.2233720368548E+18 ^ 9 --- +int(-9223372036854775799) +--- testing: 9.2233720368548E+18 ^ 65 --- +int(-9223372036854775743) +--- testing: 9.2233720368548E+18 ^ -44 --- +int(9223372036854775764) +--- testing: 9.2233720368548E+18 ^ 2147483647 --- +int(-9223372034707292161) +--- testing: 9.2233720368548E+18 ^ 9223372036854775807 --- +int(-1) +--- testing: -9223372036854775807 ^ 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 ^ 1 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 ^ -1 --- +int(9223372036854775806) +--- testing: -9223372036854775807 ^ 7 --- +int(-9223372036854775802) +--- testing: -9223372036854775807 ^ 9 --- +int(-9223372036854775800) +--- testing: -9223372036854775807 ^ 65 --- +int(-9223372036854775744) +--- testing: -9223372036854775807 ^ -44 --- +int(9223372036854775765) +--- testing: -9223372036854775807 ^ 2147483647 --- +int(-9223372034707292162) +--- testing: -9223372036854775807 ^ 9223372036854775807 --- +int(-2) +--- testing: -9.2233720368548E+18 ^ 0 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 ^ 1 --- +int(-9223372036854775807) +--- testing: -9.2233720368548E+18 ^ -1 --- +int(9223372036854775807) +--- testing: -9.2233720368548E+18 ^ 7 --- +int(-9223372036854775801) +--- testing: -9.2233720368548E+18 ^ 9 --- +int(-9223372036854775799) +--- testing: -9.2233720368548E+18 ^ 65 --- +int(-9223372036854775743) +--- testing: -9.2233720368548E+18 ^ -44 --- +int(9223372036854775764) +--- testing: -9.2233720368548E+18 ^ 2147483647 --- +int(-9223372034707292161) +--- testing: -9.2233720368548E+18 ^ 9223372036854775807 --- +int(-1) +--- testing: 0 ^ 9223372036854775807 --- +int(9223372036854775807) +--- testing: 0 ^ -9223372036854775808 --- +int(-9223372036854775808) +--- testing: 0 ^ 2147483647 --- +int(2147483647) +--- testing: 0 ^ -2147483648 --- +int(-2147483648) +--- testing: 0 ^ 9223372034707292160 --- +int(9223372034707292160) +--- testing: 0 ^ -9223372034707292160 --- +int(-9223372034707292160) +--- testing: 0 ^ 2147483648 --- +int(2147483648) +--- testing: 0 ^ -2147483649 --- +int(-2147483649) +--- testing: 0 ^ 4294967294 --- +int(4294967294) +--- testing: 0 ^ 4294967295 --- +int(4294967295) +--- testing: 0 ^ 4294967293 --- +int(4294967293) +--- testing: 0 ^ 9223372036854775806 --- +int(9223372036854775806) +--- testing: 0 ^ 9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 0 ^ -9223372036854775807 --- +int(-9223372036854775807) +--- testing: 0 ^ -9.2233720368548E+18 --- +int(-9223372036854775808) +--- testing: 1 ^ 9223372036854775807 --- +int(9223372036854775806) +--- testing: 1 ^ -9223372036854775808 --- +int(-9223372036854775807) +--- testing: 1 ^ 2147483647 --- +int(2147483646) +--- testing: 1 ^ -2147483648 --- +int(-2147483647) +--- testing: 1 ^ 9223372034707292160 --- +int(9223372034707292161) +--- testing: 1 ^ -9223372034707292160 --- +int(-9223372034707292159) +--- testing: 1 ^ 2147483648 --- +int(2147483649) +--- testing: 1 ^ -2147483649 --- +int(-2147483650) +--- testing: 1 ^ 4294967294 --- +int(4294967295) +--- testing: 1 ^ 4294967295 --- +int(4294967294) +--- testing: 1 ^ 4294967293 --- +int(4294967292) +--- testing: 1 ^ 9223372036854775806 --- +int(9223372036854775807) +--- testing: 1 ^ 9.2233720368548E+18 --- +int(-9223372036854775807) +--- testing: 1 ^ -9223372036854775807 --- +int(-9223372036854775808) +--- testing: 1 ^ -9.2233720368548E+18 --- +int(-9223372036854775807) +--- testing: -1 ^ 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -1 ^ -9223372036854775808 --- +int(9223372036854775807) +--- testing: -1 ^ 2147483647 --- +int(-2147483648) +--- testing: -1 ^ -2147483648 --- +int(2147483647) +--- testing: -1 ^ 9223372034707292160 --- +int(-9223372034707292161) +--- testing: -1 ^ -9223372034707292160 --- +int(9223372034707292159) +--- testing: -1 ^ 2147483648 --- +int(-2147483649) +--- testing: -1 ^ -2147483649 --- +int(2147483648) +--- testing: -1 ^ 4294967294 --- +int(-4294967295) +--- testing: -1 ^ 4294967295 --- +int(-4294967296) +--- testing: -1 ^ 4294967293 --- +int(-4294967294) +--- testing: -1 ^ 9223372036854775806 --- +int(-9223372036854775807) +--- testing: -1 ^ 9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: -1 ^ -9223372036854775807 --- +int(9223372036854775806) +--- testing: -1 ^ -9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: 7 ^ 9223372036854775807 --- +int(9223372036854775800) +--- testing: 7 ^ -9223372036854775808 --- +int(-9223372036854775801) +--- testing: 7 ^ 2147483647 --- +int(2147483640) +--- testing: 7 ^ -2147483648 --- +int(-2147483641) +--- testing: 7 ^ 9223372034707292160 --- +int(9223372034707292167) +--- testing: 7 ^ -9223372034707292160 --- +int(-9223372034707292153) +--- testing: 7 ^ 2147483648 --- +int(2147483655) +--- testing: 7 ^ -2147483649 --- +int(-2147483656) +--- testing: 7 ^ 4294967294 --- +int(4294967289) +--- testing: 7 ^ 4294967295 --- +int(4294967288) +--- testing: 7 ^ 4294967293 --- +int(4294967290) +--- testing: 7 ^ 9223372036854775806 --- +int(9223372036854775801) +--- testing: 7 ^ 9.2233720368548E+18 --- +int(-9223372036854775801) +--- testing: 7 ^ -9223372036854775807 --- +int(-9223372036854775802) +--- testing: 7 ^ -9.2233720368548E+18 --- +int(-9223372036854775801) +--- testing: 9 ^ 9223372036854775807 --- +int(9223372036854775798) +--- testing: 9 ^ -9223372036854775808 --- +int(-9223372036854775799) +--- testing: 9 ^ 2147483647 --- +int(2147483638) +--- testing: 9 ^ -2147483648 --- +int(-2147483639) +--- testing: 9 ^ 9223372034707292160 --- +int(9223372034707292169) +--- testing: 9 ^ -9223372034707292160 --- +int(-9223372034707292151) +--- testing: 9 ^ 2147483648 --- +int(2147483657) +--- testing: 9 ^ -2147483649 --- +int(-2147483658) +--- testing: 9 ^ 4294967294 --- +int(4294967287) +--- testing: 9 ^ 4294967295 --- +int(4294967286) +--- testing: 9 ^ 4294967293 --- +int(4294967284) +--- testing: 9 ^ 9223372036854775806 --- +int(9223372036854775799) +--- testing: 9 ^ 9.2233720368548E+18 --- +int(-9223372036854775799) +--- testing: 9 ^ -9223372036854775807 --- +int(-9223372036854775800) +--- testing: 9 ^ -9.2233720368548E+18 --- +int(-9223372036854775799) +--- testing: 65 ^ 9223372036854775807 --- +int(9223372036854775742) +--- testing: 65 ^ -9223372036854775808 --- +int(-9223372036854775743) +--- testing: 65 ^ 2147483647 --- +int(2147483582) +--- testing: 65 ^ -2147483648 --- +int(-2147483583) +--- testing: 65 ^ 9223372034707292160 --- +int(9223372034707292225) +--- testing: 65 ^ -9223372034707292160 --- +int(-9223372034707292095) +--- testing: 65 ^ 2147483648 --- +int(2147483713) +--- testing: 65 ^ -2147483649 --- +int(-2147483714) +--- testing: 65 ^ 4294967294 --- +int(4294967231) +--- testing: 65 ^ 4294967295 --- +int(4294967230) +--- testing: 65 ^ 4294967293 --- +int(4294967228) +--- testing: 65 ^ 9223372036854775806 --- +int(9223372036854775743) +--- testing: 65 ^ 9.2233720368548E+18 --- +int(-9223372036854775743) +--- testing: 65 ^ -9223372036854775807 --- +int(-9223372036854775744) +--- testing: 65 ^ -9.2233720368548E+18 --- +int(-9223372036854775743) +--- testing: -44 ^ 9223372036854775807 --- +int(-9223372036854775765) +--- testing: -44 ^ -9223372036854775808 --- +int(9223372036854775764) +--- testing: -44 ^ 2147483647 --- +int(-2147483605) +--- testing: -44 ^ -2147483648 --- +int(2147483604) +--- testing: -44 ^ 9223372034707292160 --- +int(-9223372034707292204) +--- testing: -44 ^ -9223372034707292160 --- +int(9223372034707292116) +--- testing: -44 ^ 2147483648 --- +int(-2147483692) +--- testing: -44 ^ -2147483649 --- +int(2147483691) +--- testing: -44 ^ 4294967294 --- +int(-4294967254) +--- testing: -44 ^ 4294967295 --- +int(-4294967253) +--- testing: -44 ^ 4294967293 --- +int(-4294967255) +--- testing: -44 ^ 9223372036854775806 --- +int(-9223372036854775766) +--- testing: -44 ^ 9.2233720368548E+18 --- +int(9223372036854775764) +--- testing: -44 ^ -9223372036854775807 --- +int(9223372036854775765) +--- testing: -44 ^ -9.2233720368548E+18 --- +int(9223372036854775764) +--- testing: 2147483647 ^ 9223372036854775807 --- +int(9223372034707292160) +--- testing: 2147483647 ^ -9223372036854775808 --- +int(-9223372034707292161) +--- testing: 2147483647 ^ 2147483647 --- +int(0) +--- testing: 2147483647 ^ -2147483648 --- +int(-1) +--- testing: 2147483647 ^ 9223372034707292160 --- +int(9223372036854775807) +--- testing: 2147483647 ^ -9223372034707292160 --- +int(-9223372032559808513) +--- testing: 2147483647 ^ 2147483648 --- +int(4294967295) +--- testing: 2147483647 ^ -2147483649 --- +int(-4294967296) +--- testing: 2147483647 ^ 4294967294 --- +int(2147483649) +--- testing: 2147483647 ^ 4294967295 --- +int(2147483648) +--- testing: 2147483647 ^ 4294967293 --- +int(2147483650) +--- testing: 2147483647 ^ 9223372036854775806 --- +int(9223372034707292161) +--- testing: 2147483647 ^ 9.2233720368548E+18 --- +int(-9223372034707292161) +--- testing: 2147483647 ^ -9223372036854775807 --- +int(-9223372034707292162) +--- testing: 2147483647 ^ -9.2233720368548E+18 --- +int(-9223372034707292161) +--- testing: 9223372036854775807 ^ 9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 ^ -9223372036854775808 --- +int(-1) +--- testing: 9223372036854775807 ^ 2147483647 --- +int(9223372034707292160) +--- testing: 9223372036854775807 ^ -2147483648 --- +int(-9223372034707292161) +--- testing: 9223372036854775807 ^ 9223372034707292160 --- +int(2147483647) +--- testing: 9223372036854775807 ^ -9223372034707292160 --- +int(-2147483649) +--- testing: 9223372036854775807 ^ 2147483648 --- +int(9223372034707292159) +--- testing: 9223372036854775807 ^ -2147483649 --- +int(-9223372034707292160) +--- testing: 9223372036854775807 ^ 4294967294 --- +int(9223372032559808513) +--- testing: 9223372036854775807 ^ 4294967295 --- +int(9223372032559808512) +--- testing: 9223372036854775807 ^ 4294967293 --- +int(9223372032559808514) +--- testing: 9223372036854775807 ^ 9223372036854775806 --- +int(1) +--- testing: 9223372036854775807 ^ 9.2233720368548E+18 --- +int(-1) +--- testing: 9223372036854775807 ^ -9223372036854775807 --- +int(-2) +--- testing: 9223372036854775807 ^ -9.2233720368548E+18 --- +int(-1) +===DONE=== + \ No newline at end of file diff --git a/tests/lang/operators/bitwiseXor_variationStr.phpt b/tests/lang/operators/bitwiseXor_variationStr.phpt new file mode 100644 index 0000000..7dda659 --- /dev/null +++ b/tests/lang/operators/bitwiseXor_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test ^ operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' ^ '0' --- +string(2) "00" +--- testing: '0' ^ '65' --- +string(2) "06" +--- testing: '0' ^ '-44' --- +string(2) "1d" +--- testing: '0' ^ '1.2' --- +string(2) "01" +--- testing: '0' ^ '-7.7' --- +string(2) "1d" +--- testing: '0' ^ 'abc' --- +string(2) "51" +--- testing: '0' ^ '123abc' --- +string(2) "01" +--- testing: '0' ^ '123e5' --- +string(2) "01" +--- testing: '0' ^ '123e5xyz' --- +string(2) "01" +--- testing: '0' ^ ' 123abc' --- +string(2) "10" +--- testing: '0' ^ '123 abc' --- +string(2) "01" +--- testing: '0' ^ '123abc ' --- +string(2) "01" +--- testing: '0' ^ '3.4a' --- +string(2) "03" +--- testing: '0' ^ 'a5.9' --- +string(2) "51" +--- testing: '65' ^ '0' --- +string(2) "06" +--- testing: '65' ^ '65' --- +string(4) "0000" +--- testing: '65' ^ '-44' --- +string(4) "1b01" +--- testing: '65' ^ '1.2' --- +string(4) "071b" +--- testing: '65' ^ '-7.7' --- +string(4) "1b02" +--- testing: '65' ^ 'abc' --- +string(4) "5757" +--- testing: '65' ^ '123abc' --- +string(4) "0707" +--- testing: '65' ^ '123e5' --- +string(4) "0707" +--- testing: '65' ^ '123e5xyz' --- +string(4) "0707" +--- testing: '65' ^ ' 123abc' --- +string(4) "1604" +--- testing: '65' ^ '123 abc' --- +string(4) "0707" +--- testing: '65' ^ '123abc ' --- +string(4) "0707" +--- testing: '65' ^ '3.4a' --- +string(4) "051b" +--- testing: '65' ^ 'a5.9' --- +string(4) "5700" +--- testing: '-44' ^ '0' --- +string(2) "1d" +--- testing: '-44' ^ '65' --- +string(4) "1b01" +--- testing: '-44' ^ '-44' --- +string(6) "000000" +--- testing: '-44' ^ '1.2' --- +string(6) "1c1a06" +--- testing: '-44' ^ '-7.7' --- +string(6) "00031a" +--- testing: '-44' ^ 'abc' --- +string(6) "4c5657" +--- testing: '-44' ^ '123abc' --- +string(6) "1c0607" +--- testing: '-44' ^ '123e5' --- +string(6) "1c0607" +--- testing: '-44' ^ '123e5xyz' --- +string(6) "1c0607" +--- testing: '-44' ^ ' 123abc' --- +string(6) "0d0506" +--- testing: '-44' ^ '123 abc' --- +string(6) "1c0607" +--- testing: '-44' ^ '123abc ' --- +string(6) "1c0607" +--- testing: '-44' ^ '3.4a' --- +string(6) "1e1a00" +--- testing: '-44' ^ 'a5.9' --- +string(6) "4c011a" +--- testing: '1.2' ^ '0' --- +string(2) "01" +--- testing: '1.2' ^ '65' --- +string(4) "071b" +--- testing: '1.2' ^ '-44' --- +string(6) "1c1a06" +--- testing: '1.2' ^ '1.2' --- +string(6) "000000" +--- testing: '1.2' ^ '-7.7' --- +string(6) "1c191c" +--- testing: '1.2' ^ 'abc' --- +string(6) "504c51" +--- testing: '1.2' ^ '123abc' --- +string(6) "001c01" +--- testing: '1.2' ^ '123e5' --- +string(6) "001c01" +--- testing: '1.2' ^ '123e5xyz' --- +string(6) "001c01" +--- testing: '1.2' ^ ' 123abc' --- +string(6) "111f00" +--- testing: '1.2' ^ '123 abc' --- +string(6) "001c01" +--- testing: '1.2' ^ '123abc ' --- +string(6) "001c01" +--- testing: '1.2' ^ '3.4a' --- +string(6) "020006" +--- testing: '1.2' ^ 'a5.9' --- +string(6) "501b1c" +--- testing: '-7.7' ^ '0' --- +string(2) "1d" +--- testing: '-7.7' ^ '65' --- +string(4) "1b02" +--- testing: '-7.7' ^ '-44' --- +string(6) "00031a" +--- testing: '-7.7' ^ '1.2' --- +string(6) "1c191c" +--- testing: '-7.7' ^ '-7.7' --- +string(8) "00000000" +--- testing: '-7.7' ^ 'abc' --- +string(6) "4c554d" +--- testing: '-7.7' ^ '123abc' --- +string(8) "1c051d56" +--- testing: '-7.7' ^ '123e5' --- +string(8) "1c051d52" +--- testing: '-7.7' ^ '123e5xyz' --- +string(8) "1c051d52" +--- testing: '-7.7' ^ ' 123abc' --- +string(8) "0d061c04" +--- testing: '-7.7' ^ '123 abc' --- +string(8) "1c051d17" +--- testing: '-7.7' ^ '123abc ' --- +string(8) "1c051d56" +--- testing: '-7.7' ^ '3.4a' --- +string(8) "1e191a56" +--- testing: '-7.7' ^ 'a5.9' --- +string(8) "4c02000e" +--- testing: 'abc' ^ '0' --- +string(2) "51" +--- testing: 'abc' ^ '65' --- +string(4) "5757" +--- testing: 'abc' ^ '-44' --- +string(6) "4c5657" +--- testing: 'abc' ^ '1.2' --- +string(6) "504c51" +--- testing: 'abc' ^ '-7.7' --- +string(6) "4c554d" +--- testing: 'abc' ^ 'abc' --- +string(6) "000000" +--- testing: 'abc' ^ '123abc' --- +string(6) "505050" +--- testing: 'abc' ^ '123e5' --- +string(6) "505050" +--- testing: 'abc' ^ '123e5xyz' --- +string(6) "505050" +--- testing: 'abc' ^ ' 123abc' --- +string(6) "415351" +--- testing: 'abc' ^ '123 abc' --- +string(6) "505050" +--- testing: 'abc' ^ '123abc ' --- +string(6) "505050" +--- testing: 'abc' ^ '3.4a' --- +string(6) "524c57" +--- testing: 'abc' ^ 'a5.9' --- +string(6) "00574d" +--- testing: '123abc' ^ '0' --- +string(2) "01" +--- testing: '123abc' ^ '65' --- +string(4) "0707" +--- testing: '123abc' ^ '-44' --- +string(6) "1c0607" +--- testing: '123abc' ^ '1.2' --- +string(6) "001c01" +--- testing: '123abc' ^ '-7.7' --- +string(8) "1c051d56" +--- testing: '123abc' ^ 'abc' --- +string(6) "505050" +--- testing: '123abc' ^ '123abc' --- +string(12) "000000000000" +--- testing: '123abc' ^ '123e5' --- +string(10) "0000000457" +--- testing: '123abc' ^ '123e5xyz' --- +string(12) "00000004571b" +--- testing: '123abc' ^ ' 123abc' --- +string(12) "110301520301" +--- testing: '123abc' ^ '123 abc' --- +string(12) "000000410301" +--- testing: '123abc' ^ '123abc ' --- +string(12) "000000000000" +--- testing: '123abc' ^ '3.4a' --- +string(8) "021c0700" +--- testing: '123abc' ^ 'a5.9' --- +string(8) "50071d58" +--- testing: '123e5' ^ '0' --- +string(2) "01" +--- testing: '123e5' ^ '65' --- +string(4) "0707" +--- testing: '123e5' ^ '-44' --- +string(6) "1c0607" +--- testing: '123e5' ^ '1.2' --- +string(6) "001c01" +--- testing: '123e5' ^ '-7.7' --- +string(8) "1c051d52" +--- testing: '123e5' ^ 'abc' --- +string(6) "505050" +--- testing: '123e5' ^ '123abc' --- +string(10) "0000000457" +--- testing: '123e5' ^ '123e5' --- +string(10) "0000000000" +--- testing: '123e5' ^ '123e5xyz' --- +string(10) "0000000000" +--- testing: '123e5' ^ ' 123abc' --- +string(10) "1103015654" +--- testing: '123e5' ^ '123 abc' --- +string(10) "0000004554" +--- testing: '123e5' ^ '123abc ' --- +string(10) "0000000457" +--- testing: '123e5' ^ '3.4a' --- +string(8) "021c0704" +--- testing: '123e5' ^ 'a5.9' --- +string(8) "50071d5c" +--- testing: '123e5xyz' ^ '0' --- +string(2) "01" +--- testing: '123e5xyz' ^ '65' --- +string(4) "0707" +--- testing: '123e5xyz' ^ '-44' --- +string(6) "1c0607" +--- testing: '123e5xyz' ^ '1.2' --- +string(6) "001c01" +--- testing: '123e5xyz' ^ '-7.7' --- +string(8) "1c051d52" +--- testing: '123e5xyz' ^ 'abc' --- +string(6) "505050" +--- testing: '123e5xyz' ^ '123abc' --- +string(12) "00000004571b" +--- testing: '123e5xyz' ^ '123e5' --- +string(10) "0000000000" +--- testing: '123e5xyz' ^ '123e5xyz' --- +string(16) "0000000000000000" +--- testing: '123e5xyz' ^ ' 123abc' --- +string(14) "11030156541a1a" +--- testing: '123e5xyz' ^ '123 abc' --- +string(14) "00000045541a1a" +--- testing: '123e5xyz' ^ '123abc ' --- +string(14) "00000004571b59" +--- testing: '123e5xyz' ^ '3.4a' --- +string(8) "021c0704" +--- testing: '123e5xyz' ^ 'a5.9' --- +string(8) "50071d5c" +--- testing: ' 123abc' ^ '0' --- +string(2) "10" +--- testing: ' 123abc' ^ '65' --- +string(4) "1604" +--- testing: ' 123abc' ^ '-44' --- +string(6) "0d0506" +--- testing: ' 123abc' ^ '1.2' --- +string(6) "111f00" +--- testing: ' 123abc' ^ '-7.7' --- +string(8) "0d061c04" +--- testing: ' 123abc' ^ 'abc' --- +string(6) "415351" +--- testing: ' 123abc' ^ '123abc' --- +string(12) "110301520301" +--- testing: ' 123abc' ^ '123e5' --- +string(10) "1103015654" +--- testing: ' 123abc' ^ '123e5xyz' --- +string(14) "11030156541a1a" +--- testing: ' 123abc' ^ ' 123abc' --- +string(14) "00000000000000" +--- testing: ' 123abc' ^ '123 abc' --- +string(14) "11030113000000" +--- testing: ' 123abc' ^ '123abc ' --- +string(14) "11030152030143" +--- testing: ' 123abc' ^ '3.4a' --- +string(8) "131f0652" +--- testing: ' 123abc' ^ 'a5.9' --- +string(8) "41041c0a" +--- testing: '123 abc' ^ '0' --- +string(2) "01" +--- testing: '123 abc' ^ '65' --- +string(4) "0707" +--- testing: '123 abc' ^ '-44' --- +string(6) "1c0607" +--- testing: '123 abc' ^ '1.2' --- +string(6) "001c01" +--- testing: '123 abc' ^ '-7.7' --- +string(8) "1c051d17" +--- testing: '123 abc' ^ 'abc' --- +string(6) "505050" +--- testing: '123 abc' ^ '123abc' --- +string(12) "000000410301" +--- testing: '123 abc' ^ '123e5' --- +string(10) "0000004554" +--- testing: '123 abc' ^ '123e5xyz' --- +string(14) "00000045541a1a" +--- testing: '123 abc' ^ ' 123abc' --- +string(14) "11030113000000" +--- testing: '123 abc' ^ '123 abc' --- +string(14) "00000000000000" +--- testing: '123 abc' ^ '123abc ' --- +string(14) "00000041030143" +--- testing: '123 abc' ^ '3.4a' --- +string(8) "021c0741" +--- testing: '123 abc' ^ 'a5.9' --- +string(8) "50071d19" +--- testing: '123abc ' ^ '0' --- +string(2) "01" +--- testing: '123abc ' ^ '65' --- +string(4) "0707" +--- testing: '123abc ' ^ '-44' --- +string(6) "1c0607" +--- testing: '123abc ' ^ '1.2' --- +string(6) "001c01" +--- testing: '123abc ' ^ '-7.7' --- +string(8) "1c051d56" +--- testing: '123abc ' ^ 'abc' --- +string(6) "505050" +--- testing: '123abc ' ^ '123abc' --- +string(12) "000000000000" +--- testing: '123abc ' ^ '123e5' --- +string(10) "0000000457" +--- testing: '123abc ' ^ '123e5xyz' --- +string(14) "00000004571b59" +--- testing: '123abc ' ^ ' 123abc' --- +string(14) "11030152030143" +--- testing: '123abc ' ^ '123 abc' --- +string(14) "00000041030143" +--- testing: '123abc ' ^ '123abc ' --- +string(14) "00000000000000" +--- testing: '123abc ' ^ '3.4a' --- +string(8) "021c0700" +--- testing: '123abc ' ^ 'a5.9' --- +string(8) "50071d58" +--- testing: '3.4a' ^ '0' --- +string(2) "03" +--- testing: '3.4a' ^ '65' --- +string(4) "051b" +--- testing: '3.4a' ^ '-44' --- +string(6) "1e1a00" +--- testing: '3.4a' ^ '1.2' --- +string(6) "020006" +--- testing: '3.4a' ^ '-7.7' --- +string(8) "1e191a56" +--- testing: '3.4a' ^ 'abc' --- +string(6) "524c57" +--- testing: '3.4a' ^ '123abc' --- +string(8) "021c0700" +--- testing: '3.4a' ^ '123e5' --- +string(8) "021c0704" +--- testing: '3.4a' ^ '123e5xyz' --- +string(8) "021c0704" +--- testing: '3.4a' ^ ' 123abc' --- +string(8) "131f0652" +--- testing: '3.4a' ^ '123 abc' --- +string(8) "021c0741" +--- testing: '3.4a' ^ '123abc ' --- +string(8) "021c0700" +--- testing: '3.4a' ^ '3.4a' --- +string(8) "00000000" +--- testing: '3.4a' ^ 'a5.9' --- +string(8) "521b1a58" +--- testing: 'a5.9' ^ '0' --- +string(2) "51" +--- testing: 'a5.9' ^ '65' --- +string(4) "5700" +--- testing: 'a5.9' ^ '-44' --- +string(6) "4c011a" +--- testing: 'a5.9' ^ '1.2' --- +string(6) "501b1c" +--- testing: 'a5.9' ^ '-7.7' --- +string(8) "4c02000e" +--- testing: 'a5.9' ^ 'abc' --- +string(6) "00574d" +--- testing: 'a5.9' ^ '123abc' --- +string(8) "50071d58" +--- testing: 'a5.9' ^ '123e5' --- +string(8) "50071d5c" +--- testing: 'a5.9' ^ '123e5xyz' --- +string(8) "50071d5c" +--- testing: 'a5.9' ^ ' 123abc' --- +string(8) "41041c0a" +--- testing: 'a5.9' ^ '123 abc' --- +string(8) "50071d19" +--- testing: 'a5.9' ^ '123abc ' --- +string(8) "50071d58" +--- testing: 'a5.9' ^ '3.4a' --- +string(8) "521b1a58" +--- testing: 'a5.9' ^ 'a5.9' --- +string(8) "00000000" +===DONE=== diff --git a/tests/lang/operators/divide_basiclong_64bit.phpt b/tests/lang/operators/divide_basiclong_64bit.phpt new file mode 100644 index 0000000..b5d6df9 --- /dev/null +++ b/tests/lang/operators/divide_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test / operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 / 0 --- +bool(false) +--- testing: 9223372036854775807 / 1 --- +int(9223372036854775807) +--- testing: 9223372036854775807 / -1 --- +int(-9223372036854775807) +--- testing: 9223372036854775807 / 7 --- +int(1317624576693539401) +--- testing: 9223372036854775807 / 9 --- +float(1.0248191152061E+18) +--- testing: 9223372036854775807 / 65 --- +float(1.4189803133623E+17) +--- testing: 9223372036854775807 / -44 --- +float(-2.096220917467E+17) +--- testing: 9223372036854775807 / 2147483647 --- +float(4294967298) +--- testing: 9223372036854775807 / 9223372036854775807 --- +int(1) +--- testing: -9223372036854775808 / 0 --- +bool(false) +--- testing: -9223372036854775808 / 1 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 / -1 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775808 / 7 --- +float(-1.3176245766935E+18) +--- testing: -9223372036854775808 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9223372036854775808 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9223372036854775808 / -44 --- +float(2.096220917467E+17) +--- testing: -9223372036854775808 / 2147483647 --- +float(-4294967298) +--- testing: -9223372036854775808 / 9223372036854775807 --- +float(-1) +--- testing: 2147483647 / 0 --- +bool(false) +--- testing: 2147483647 / 1 --- +int(2147483647) +--- testing: 2147483647 / -1 --- +int(-2147483647) +--- testing: 2147483647 / 7 --- +float(306783378.14286) +--- testing: 2147483647 / 9 --- +float(238609294.11111) +--- testing: 2147483647 / 65 --- +float(33038209.953846) +--- testing: 2147483647 / -44 --- +float(-48806446.522727) +--- testing: 2147483647 / 2147483647 --- +int(1) +--- testing: 2147483647 / 9223372036854775807 --- +float(2.3283064354545E-10) +--- testing: -2147483648 / 0 --- +bool(false) +--- testing: -2147483648 / 1 --- +int(-2147483648) +--- testing: -2147483648 / -1 --- +int(2147483648) +--- testing: -2147483648 / 7 --- +float(-306783378.28571) +--- testing: -2147483648 / 9 --- +float(-238609294.22222) +--- testing: -2147483648 / 65 --- +float(-33038209.969231) +--- testing: -2147483648 / -44 --- +float(48806446.545455) +--- testing: -2147483648 / 2147483647 --- +float(-1.0000000004657) +--- testing: -2147483648 / 9223372036854775807 --- +float(-2.3283064365387E-10) +--- testing: 9223372034707292160 / 0 --- +bool(false) +--- testing: 9223372034707292160 / 1 --- +int(9223372034707292160) +--- testing: 9223372034707292160 / -1 --- +int(-9223372034707292160) +--- testing: 9223372034707292160 / 7 --- +float(1.3176245763868E+18) +--- testing: 9223372034707292160 / 9 --- +float(1.0248191149675E+18) +--- testing: 9223372034707292160 / 65 --- +float(1.4189803130319E+17) +--- testing: 9223372034707292160 / -44 --- +float(-2.0962209169789E+17) +--- testing: 9223372034707292160 / 2147483647 --- +float(4294967297) +--- testing: 9223372034707292160 / 9223372036854775807 --- +float(0.99999999976717) +--- testing: -9223372034707292160 / 0 --- +bool(false) +--- testing: -9223372034707292160 / 1 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 / -1 --- +int(9223372034707292160) +--- testing: -9223372034707292160 / 7 --- +float(-1.3176245763868E+18) +--- testing: -9223372034707292160 / 9 --- +float(-1.0248191149675E+18) +--- testing: -9223372034707292160 / 65 --- +float(-1.4189803130319E+17) +--- testing: -9223372034707292160 / -44 --- +float(2.0962209169789E+17) +--- testing: -9223372034707292160 / 2147483647 --- +float(-4294967297) +--- testing: -9223372034707292160 / 9223372036854775807 --- +float(-0.99999999976717) +--- testing: 2147483648 / 0 --- +bool(false) +--- testing: 2147483648 / 1 --- +int(2147483648) +--- testing: 2147483648 / -1 --- +int(-2147483648) +--- testing: 2147483648 / 7 --- +float(306783378.28571) +--- testing: 2147483648 / 9 --- +float(238609294.22222) +--- testing: 2147483648 / 65 --- +float(33038209.969231) +--- testing: 2147483648 / -44 --- +float(-48806446.545455) +--- testing: 2147483648 / 2147483647 --- +float(1.0000000004657) +--- testing: 2147483648 / 9223372036854775807 --- +float(2.3283064365387E-10) +--- testing: -2147483649 / 0 --- +bool(false) +--- testing: -2147483649 / 1 --- +int(-2147483649) +--- testing: -2147483649 / -1 --- +int(2147483649) +--- testing: -2147483649 / 7 --- +float(-306783378.42857) +--- testing: -2147483649 / 9 --- +float(-238609294.33333) +--- testing: -2147483649 / 65 --- +float(-33038209.984615) +--- testing: -2147483649 / -44 --- +float(48806446.568182) +--- testing: -2147483649 / 2147483647 --- +float(-1.0000000009313) +--- testing: -2147483649 / 9223372036854775807 --- +float(-2.3283064376229E-10) +--- testing: 4294967294 / 0 --- +bool(false) +--- testing: 4294967294 / 1 --- +int(4294967294) +--- testing: 4294967294 / -1 --- +int(-4294967294) +--- testing: 4294967294 / 7 --- +float(613566756.28571) +--- testing: 4294967294 / 9 --- +float(477218588.22222) +--- testing: 4294967294 / 65 --- +float(66076419.907692) +--- testing: 4294967294 / -44 --- +float(-97612893.045455) +--- testing: 4294967294 / 2147483647 --- +int(2) +--- testing: 4294967294 / 9223372036854775807 --- +float(4.656612870909E-10) +--- testing: 4294967295 / 0 --- +bool(false) +--- testing: 4294967295 / 1 --- +int(4294967295) +--- testing: 4294967295 / -1 --- +int(-4294967295) +--- testing: 4294967295 / 7 --- +float(613566756.42857) +--- testing: 4294967295 / 9 --- +float(477218588.33333) +--- testing: 4294967295 / 65 --- +float(66076419.923077) +--- testing: 4294967295 / -44 --- +float(-97612893.068182) +--- testing: 4294967295 / 2147483647 --- +float(2.0000000004657) +--- testing: 4294967295 / 9223372036854775807 --- +float(4.6566128719932E-10) +--- testing: 4294967293 / 0 --- +bool(false) +--- testing: 4294967293 / 1 --- +int(4294967293) +--- testing: 4294967293 / -1 --- +int(-4294967293) +--- testing: 4294967293 / 7 --- +float(613566756.14286) +--- testing: 4294967293 / 9 --- +float(477218588.11111) +--- testing: 4294967293 / 65 --- +float(66076419.892308) +--- testing: 4294967293 / -44 --- +float(-97612893.022727) +--- testing: 4294967293 / 2147483647 --- +float(1.9999999995343) +--- testing: 4294967293 / 9223372036854775807 --- +float(4.6566128698248E-10) +--- testing: 9223372036854775806 / 0 --- +bool(false) +--- testing: 9223372036854775806 / 1 --- +int(9223372036854775806) +--- testing: 9223372036854775806 / -1 --- +int(-9223372036854775806) +--- testing: 9223372036854775806 / 7 --- +float(1.3176245766935E+18) +--- testing: 9223372036854775806 / 9 --- +float(1.0248191152061E+18) +--- testing: 9223372036854775806 / 65 --- +float(1.4189803133623E+17) +--- testing: 9223372036854775806 / -44 --- +float(-2.096220917467E+17) +--- testing: 9223372036854775806 / 2147483647 --- +int(4294967298) +--- testing: 9223372036854775806 / 9223372036854775807 --- +float(1) +--- testing: 9.2233720368548E+18 / 0 --- +bool(false) +--- testing: 9.2233720368548E+18 / 1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 / -1 --- +float(-9.2233720368548E+18) +--- testing: 9.2233720368548E+18 / 7 --- +float(1.3176245766935E+18) +--- testing: 9.2233720368548E+18 / 9 --- +float(1.0248191152061E+18) +--- testing: 9.2233720368548E+18 / 65 --- +float(1.4189803133623E+17) +--- testing: 9.2233720368548E+18 / -44 --- +float(-2.096220917467E+17) +--- testing: 9.2233720368548E+18 / 2147483647 --- +float(4294967298) +--- testing: 9.2233720368548E+18 / 9223372036854775807 --- +float(1) +--- testing: -9223372036854775807 / 0 --- +bool(false) +--- testing: -9223372036854775807 / 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 / -1 --- +int(9223372036854775807) +--- testing: -9223372036854775807 / 7 --- +int(-1317624576693539401) +--- testing: -9223372036854775807 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9223372036854775807 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9223372036854775807 / -44 --- +float(2.096220917467E+17) +--- testing: -9223372036854775807 / 2147483647 --- +float(-4294967298) +--- testing: -9223372036854775807 / 9223372036854775807 --- +int(-1) +--- testing: -9.2233720368548E+18 / 0 --- +bool(false) +--- testing: -9.2233720368548E+18 / 1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 / -1 --- +float(9.2233720368548E+18) +--- testing: -9.2233720368548E+18 / 7 --- +float(-1.3176245766935E+18) +--- testing: -9.2233720368548E+18 / 9 --- +float(-1.0248191152061E+18) +--- testing: -9.2233720368548E+18 / 65 --- +float(-1.4189803133623E+17) +--- testing: -9.2233720368548E+18 / -44 --- +float(2.096220917467E+17) +--- testing: -9.2233720368548E+18 / 2147483647 --- +float(-4294967298) +--- testing: -9.2233720368548E+18 / 9223372036854775807 --- +float(-1) +--- testing: 0 / 9223372036854775807 --- +int(0) +--- testing: 0 / -9223372036854775808 --- +int(0) +--- testing: 0 / 2147483647 --- +int(0) +--- testing: 0 / -2147483648 --- +int(0) +--- testing: 0 / 9223372034707292160 --- +int(0) +--- testing: 0 / -9223372034707292160 --- +int(0) +--- testing: 0 / 2147483648 --- +int(0) +--- testing: 0 / -2147483649 --- +int(0) +--- testing: 0 / 4294967294 --- +int(0) +--- testing: 0 / 4294967295 --- +int(0) +--- testing: 0 / 4294967293 --- +int(0) +--- testing: 0 / 9223372036854775806 --- +int(0) +--- testing: 0 / 9.2233720368548E+18 --- +float(0) +--- testing: 0 / -9223372036854775807 --- +int(0) +--- testing: 0 / -9.2233720368548E+18 --- +float(-0) +--- testing: 1 / 9223372036854775807 --- +float(1.0842021724855E-19) +--- testing: 1 / -9223372036854775808 --- +float(-1.0842021724855E-19) +--- testing: 1 / 2147483647 --- +float(4.6566128752458E-10) +--- testing: 1 / -2147483648 --- +float(-4.6566128730774E-10) +--- testing: 1 / 9223372034707292160 --- +float(1.0842021727379E-19) +--- testing: 1 / -9223372034707292160 --- +float(-1.0842021727379E-19) +--- testing: 1 / 2147483648 --- +float(4.6566128730774E-10) +--- testing: 1 / -2147483649 --- +float(-4.656612870909E-10) +--- testing: 1 / 4294967294 --- +float(2.3283064376229E-10) +--- testing: 1 / 4294967295 --- +float(2.3283064370808E-10) +--- testing: 1 / 4294967293 --- +float(2.328306438165E-10) +--- testing: 1 / 9223372036854775806 --- +float(1.0842021724855E-19) +--- testing: 1 / 9.2233720368548E+18 --- +float(1.0842021724855E-19) +--- testing: 1 / -9223372036854775807 --- +float(-1.0842021724855E-19) +--- testing: 1 / -9.2233720368548E+18 --- +float(-1.0842021724855E-19) +--- testing: -1 / 9223372036854775807 --- +float(-1.0842021724855E-19) +--- testing: -1 / -9223372036854775808 --- +float(1.0842021724855E-19) +--- testing: -1 / 2147483647 --- +float(-4.6566128752458E-10) +--- testing: -1 / -2147483648 --- +float(4.6566128730774E-10) +--- testing: -1 / 9223372034707292160 --- +float(-1.0842021727379E-19) +--- testing: -1 / -9223372034707292160 --- +float(1.0842021727379E-19) +--- testing: -1 / 2147483648 --- +float(-4.6566128730774E-10) +--- testing: -1 / -2147483649 --- +float(4.656612870909E-10) +--- testing: -1 / 4294967294 --- +float(-2.3283064376229E-10) +--- testing: -1 / 4294967295 --- +float(-2.3283064370808E-10) +--- testing: -1 / 4294967293 --- +float(-2.328306438165E-10) +--- testing: -1 / 9223372036854775806 --- +float(-1.0842021724855E-19) +--- testing: -1 / 9.2233720368548E+18 --- +float(-1.0842021724855E-19) +--- testing: -1 / -9223372036854775807 --- +float(1.0842021724855E-19) +--- testing: -1 / -9.2233720368548E+18 --- +float(1.0842021724855E-19) +--- testing: 7 / 9223372036854775807 --- +float(7.5894152073985E-19) +--- testing: 7 / -9223372036854775808 --- +float(-7.5894152073985E-19) +--- testing: 7 / 2147483647 --- +float(3.2596290126721E-9) +--- testing: 7 / -2147483648 --- +float(-3.2596290111542E-9) +--- testing: 7 / 9223372034707292160 --- +float(7.5894152091656E-19) +--- testing: 7 / -9223372034707292160 --- +float(-7.5894152091656E-19) +--- testing: 7 / 2147483648 --- +float(3.2596290111542E-9) +--- testing: 7 / -2147483649 --- +float(-3.2596290096363E-9) +--- testing: 7 / 4294967294 --- +float(1.629814506336E-9) +--- testing: 7 / 4294967295 --- +float(1.6298145059566E-9) +--- testing: 7 / 4294967293 --- +float(1.6298145067155E-9) +--- testing: 7 / 9223372036854775806 --- +float(7.5894152073985E-19) +--- testing: 7 / 9.2233720368548E+18 --- +float(7.5894152073985E-19) +--- testing: 7 / -9223372036854775807 --- +float(-7.5894152073985E-19) +--- testing: 7 / -9.2233720368548E+18 --- +float(-7.5894152073985E-19) +--- testing: 9 / 9223372036854775807 --- +float(9.7578195523695E-19) +--- testing: 9 / -9223372036854775808 --- +float(-9.7578195523695E-19) +--- testing: 9 / 2147483647 --- +float(4.1909515877212E-9) +--- testing: 9 / -2147483648 --- +float(-4.1909515857697E-9) +--- testing: 9 / 9223372034707292160 --- +float(9.7578195546415E-19) +--- testing: 9 / -9223372034707292160 --- +float(-9.7578195546415E-19) +--- testing: 9 / 2147483648 --- +float(4.1909515857697E-9) +--- testing: 9 / -2147483649 --- +float(-4.1909515838181E-9) +--- testing: 9 / 4294967294 --- +float(2.0954757938606E-9) +--- testing: 9 / 4294967295 --- +float(2.0954757933727E-9) +--- testing: 9 / 4294967293 --- +float(2.0954757943485E-9) +--- testing: 9 / 9223372036854775806 --- +float(9.7578195523695E-19) +--- testing: 9 / 9.2233720368548E+18 --- +float(9.7578195523695E-19) +--- testing: 9 / -9223372036854775807 --- +float(-9.7578195523695E-19) +--- testing: 9 / -9.2233720368548E+18 --- +float(-9.7578195523695E-19) +--- testing: 65 / 9223372036854775807 --- +float(7.0473141211558E-18) +--- testing: 65 / -9223372036854775808 --- +float(-7.0473141211558E-18) +--- testing: 65 / 2147483647 --- +float(3.0267983689098E-8) +--- testing: 65 / -2147483648 --- +float(-3.0267983675003E-8) +--- testing: 65 / 9223372034707292160 --- +float(7.0473141227966E-18) +--- testing: 65 / -9223372034707292160 --- +float(-7.0473141227966E-18) +--- testing: 65 / 2147483648 --- +float(3.0267983675003E-8) +--- testing: 65 / -2147483649 --- +float(-3.0267983660908E-8) +--- testing: 65 / 4294967294 --- +float(1.5133991844549E-8) +--- testing: 65 / 4294967295 --- +float(1.5133991841025E-8) +--- testing: 65 / 4294967293 --- +float(1.5133991848072E-8) +--- testing: 65 / 9223372036854775806 --- +float(7.0473141211558E-18) +--- testing: 65 / 9.2233720368548E+18 --- +float(7.0473141211558E-18) +--- testing: 65 / -9223372036854775807 --- +float(-7.0473141211558E-18) +--- testing: 65 / -9.2233720368548E+18 --- +float(-7.0473141211558E-18) +--- testing: -44 / 9223372036854775807 --- +float(-4.7704895589362E-18) +--- testing: -44 / -9223372036854775808 --- +float(4.7704895589362E-18) +--- testing: -44 / 2147483647 --- +float(-2.0489096651082E-8) +--- testing: -44 / -2147483648 --- +float(2.0489096641541E-8) +--- testing: -44 / 9223372034707292160 --- +float(-4.7704895600469E-18) +--- testing: -44 / -9223372034707292160 --- +float(4.7704895600469E-18) +--- testing: -44 / 2147483648 --- +float(-2.0489096641541E-8) +--- testing: -44 / -2147483649 --- +float(2.0489096632E-8) +--- testing: -44 / 4294967294 --- +float(-1.0244548325541E-8) +--- testing: -44 / 4294967295 --- +float(-1.0244548323156E-8) +--- testing: -44 / 4294967293 --- +float(-1.0244548327926E-8) +--- testing: -44 / 9223372036854775806 --- +float(-4.7704895589362E-18) +--- testing: -44 / 9.2233720368548E+18 --- +float(-4.7704895589362E-18) +--- testing: -44 / -9223372036854775807 --- +float(4.7704895589362E-18) +--- testing: -44 / -9.2233720368548E+18 --- +float(4.7704895589362E-18) +--- testing: 2147483647 / 9223372036854775807 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / -9223372036854775808 --- +float(-2.3283064354545E-10) +--- testing: 2147483647 / 2147483647 --- +int(1) +--- testing: 2147483647 / -2147483648 --- +float(-0.99999999953434) +--- testing: 2147483647 / 9223372034707292160 --- +float(2.3283064359966E-10) +--- testing: 2147483647 / -9223372034707292160 --- +float(-2.3283064359966E-10) +--- testing: 2147483647 / 2147483648 --- +float(0.99999999953434) +--- testing: 2147483647 / -2147483649 --- +float(-0.99999999906868) +--- testing: 2147483647 / 4294967294 --- +float(0.5) +--- testing: 2147483647 / 4294967295 --- +float(0.49999999988358) +--- testing: 2147483647 / 4294967293 --- +float(0.50000000011642) +--- testing: 2147483647 / 9223372036854775806 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / 9.2233720368548E+18 --- +float(2.3283064354545E-10) +--- testing: 2147483647 / -9223372036854775807 --- +float(-2.3283064354545E-10) +--- testing: 2147483647 / -9.2233720368548E+18 --- +float(-2.3283064354545E-10) +--- testing: 9223372036854775807 / 9223372036854775807 --- +int(1) +--- testing: 9223372036854775807 / -9223372036854775808 --- +float(-1) +--- testing: 9223372036854775807 / 2147483647 --- +float(4294967298) +--- testing: 9223372036854775807 / -2147483648 --- +float(-4294967296) +--- testing: 9223372036854775807 / 9223372034707292160 --- +float(1.0000000002328) +--- testing: 9223372036854775807 / -9223372034707292160 --- +float(-1.0000000002328) +--- testing: 9223372036854775807 / 2147483648 --- +float(4294967296) +--- testing: 9223372036854775807 / -2147483649 --- +float(-4294967294) +--- testing: 9223372036854775807 / 4294967294 --- +float(2147483649) +--- testing: 9223372036854775807 / 4294967295 --- +float(2147483648.5) +--- testing: 9223372036854775807 / 4294967293 --- +float(2147483649.5) +--- testing: 9223372036854775807 / 9223372036854775806 --- +float(1) +--- testing: 9223372036854775807 / 9.2233720368548E+18 --- +float(1) +--- testing: 9223372036854775807 / -9223372036854775807 --- +int(-1) +--- testing: 9223372036854775807 / -9.2233720368548E+18 --- +float(-1) +===DONE=== diff --git a/tests/lang/operators/divide_variationStr.phpt b/tests/lang/operators/divide_variationStr.phpt new file mode 100644 index 0000000..e48e9e1 --- /dev/null +++ b/tests/lang/operators/divide_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test / operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' / '0' --- +bool(false) +--- testing: '0' / '65' --- +int(0) +--- testing: '0' / '-44' --- +int(0) +--- testing: '0' / '1.2' --- +float(0) +--- testing: '0' / '-7.7' --- +float(-0) +--- testing: '0' / 'abc' --- +bool(false) +--- testing: '0' / '123abc' --- +int(0) +--- testing: '0' / '123e5' --- +float(0) +--- testing: '0' / '123e5xyz' --- +float(0) +--- testing: '0' / ' 123abc' --- +int(0) +--- testing: '0' / '123 abc' --- +int(0) +--- testing: '0' / '123abc ' --- +int(0) +--- testing: '0' / '3.4a' --- +float(0) +--- testing: '0' / 'a5.9' --- +bool(false) +--- testing: '65' / '0' --- +bool(false) +--- testing: '65' / '65' --- +int(1) +--- testing: '65' / '-44' --- +float(-1.4772727272727) +--- testing: '65' / '1.2' --- +float(54.166666666667) +--- testing: '65' / '-7.7' --- +float(-8.4415584415584) +--- testing: '65' / 'abc' --- +bool(false) +--- testing: '65' / '123abc' --- +float(0.52845528455285) +--- testing: '65' / '123e5' --- +float(5.2845528455285E-6) +--- testing: '65' / '123e5xyz' --- +float(5.2845528455285E-6) +--- testing: '65' / ' 123abc' --- +float(0.52845528455285) +--- testing: '65' / '123 abc' --- +float(0.52845528455285) +--- testing: '65' / '123abc ' --- +float(0.52845528455285) +--- testing: '65' / '3.4a' --- +float(19.117647058824) +--- testing: '65' / 'a5.9' --- +bool(false) +--- testing: '-44' / '0' --- +bool(false) +--- testing: '-44' / '65' --- +float(-0.67692307692308) +--- testing: '-44' / '-44' --- +int(1) +--- testing: '-44' / '1.2' --- +float(-36.666666666667) +--- testing: '-44' / '-7.7' --- +float(5.7142857142857) +--- testing: '-44' / 'abc' --- +bool(false) +--- testing: '-44' / '123abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123e5' --- +float(-3.5772357723577E-6) +--- testing: '-44' / '123e5xyz' --- +float(-3.5772357723577E-6) +--- testing: '-44' / ' 123abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123 abc' --- +float(-0.35772357723577) +--- testing: '-44' / '123abc ' --- +float(-0.35772357723577) +--- testing: '-44' / '3.4a' --- +float(-12.941176470588) +--- testing: '-44' / 'a5.9' --- +bool(false) +--- testing: '1.2' / '0' --- +bool(false) +--- testing: '1.2' / '65' --- +float(0.018461538461538) +--- testing: '1.2' / '-44' --- +float(-0.027272727272727) +--- testing: '1.2' / '1.2' --- +float(1) +--- testing: '1.2' / '-7.7' --- +float(-0.15584415584416) +--- testing: '1.2' / 'abc' --- +bool(false) +--- testing: '1.2' / '123abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123e5' --- +float(9.7560975609756E-8) +--- testing: '1.2' / '123e5xyz' --- +float(9.7560975609756E-8) +--- testing: '1.2' / ' 123abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123 abc' --- +float(0.0097560975609756) +--- testing: '1.2' / '123abc ' --- +float(0.0097560975609756) +--- testing: '1.2' / '3.4a' --- +float(0.35294117647059) +--- testing: '1.2' / 'a5.9' --- +bool(false) +--- testing: '-7.7' / '0' --- +bool(false) +--- testing: '-7.7' / '65' --- +float(-0.11846153846154) +--- testing: '-7.7' / '-44' --- +float(0.175) +--- testing: '-7.7' / '1.2' --- +float(-6.4166666666667) +--- testing: '-7.7' / '-7.7' --- +float(1) +--- testing: '-7.7' / 'abc' --- +bool(false) +--- testing: '-7.7' / '123abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123e5' --- +float(-6.260162601626E-7) +--- testing: '-7.7' / '123e5xyz' --- +float(-6.260162601626E-7) +--- testing: '-7.7' / ' 123abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123 abc' --- +float(-0.06260162601626) +--- testing: '-7.7' / '123abc ' --- +float(-0.06260162601626) +--- testing: '-7.7' / '3.4a' --- +float(-2.2647058823529) +--- testing: '-7.7' / 'a5.9' --- +bool(false) +--- testing: 'abc' / '0' --- +bool(false) +--- testing: 'abc' / '65' --- +int(0) +--- testing: 'abc' / '-44' --- +int(0) +--- testing: 'abc' / '1.2' --- +float(0) +--- testing: 'abc' / '-7.7' --- +float(-0) +--- testing: 'abc' / 'abc' --- +bool(false) +--- testing: 'abc' / '123abc' --- +int(0) +--- testing: 'abc' / '123e5' --- +float(0) +--- testing: 'abc' / '123e5xyz' --- +float(0) +--- testing: 'abc' / ' 123abc' --- +int(0) +--- testing: 'abc' / '123 abc' --- +int(0) +--- testing: 'abc' / '123abc ' --- +int(0) +--- testing: 'abc' / '3.4a' --- +float(0) +--- testing: 'abc' / 'a5.9' --- +bool(false) +--- testing: '123abc' / '0' --- +bool(false) +--- testing: '123abc' / '65' --- +float(1.8923076923077) +--- testing: '123abc' / '-44' --- +float(-2.7954545454545) +--- testing: '123abc' / '1.2' --- +float(102.5) +--- testing: '123abc' / '-7.7' --- +float(-15.974025974026) +--- testing: '123abc' / 'abc' --- +bool(false) +--- testing: '123abc' / '123abc' --- +int(1) +--- testing: '123abc' / '123e5' --- +float(1.0E-5) +--- testing: '123abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123abc' / ' 123abc' --- +int(1) +--- testing: '123abc' / '123 abc' --- +int(1) +--- testing: '123abc' / '123abc ' --- +int(1) +--- testing: '123abc' / '3.4a' --- +float(36.176470588235) +--- testing: '123abc' / 'a5.9' --- +bool(false) +--- testing: '123e5' / '0' --- +bool(false) +--- testing: '123e5' / '65' --- +float(189230.76923077) +--- testing: '123e5' / '-44' --- +float(-279545.45454545) +--- testing: '123e5' / '1.2' --- +float(10250000) +--- testing: '123e5' / '-7.7' --- +float(-1597402.5974026) +--- testing: '123e5' / 'abc' --- +bool(false) +--- testing: '123e5' / '123abc' --- +float(100000) +--- testing: '123e5' / '123e5' --- +float(1) +--- testing: '123e5' / '123e5xyz' --- +float(1) +--- testing: '123e5' / ' 123abc' --- +float(100000) +--- testing: '123e5' / '123 abc' --- +float(100000) +--- testing: '123e5' / '123abc ' --- +float(100000) +--- testing: '123e5' / '3.4a' --- +float(3617647.0588235) +--- testing: '123e5' / 'a5.9' --- +bool(false) +--- testing: '123e5xyz' / '0' --- +bool(false) +--- testing: '123e5xyz' / '65' --- +float(189230.76923077) +--- testing: '123e5xyz' / '-44' --- +float(-279545.45454545) +--- testing: '123e5xyz' / '1.2' --- +float(10250000) +--- testing: '123e5xyz' / '-7.7' --- +float(-1597402.5974026) +--- testing: '123e5xyz' / 'abc' --- +bool(false) +--- testing: '123e5xyz' / '123abc' --- +float(100000) +--- testing: '123e5xyz' / '123e5' --- +float(1) +--- testing: '123e5xyz' / '123e5xyz' --- +float(1) +--- testing: '123e5xyz' / ' 123abc' --- +float(100000) +--- testing: '123e5xyz' / '123 abc' --- +float(100000) +--- testing: '123e5xyz' / '123abc ' --- +float(100000) +--- testing: '123e5xyz' / '3.4a' --- +float(3617647.0588235) +--- testing: '123e5xyz' / 'a5.9' --- +bool(false) +--- testing: ' 123abc' / '0' --- +bool(false) +--- testing: ' 123abc' / '65' --- +float(1.8923076923077) +--- testing: ' 123abc' / '-44' --- +float(-2.7954545454545) +--- testing: ' 123abc' / '1.2' --- +float(102.5) +--- testing: ' 123abc' / '-7.7' --- +float(-15.974025974026) +--- testing: ' 123abc' / 'abc' --- +bool(false) +--- testing: ' 123abc' / '123abc' --- +int(1) +--- testing: ' 123abc' / '123e5' --- +float(1.0E-5) +--- testing: ' 123abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: ' 123abc' / ' 123abc' --- +int(1) +--- testing: ' 123abc' / '123 abc' --- +int(1) +--- testing: ' 123abc' / '123abc ' --- +int(1) +--- testing: ' 123abc' / '3.4a' --- +float(36.176470588235) +--- testing: ' 123abc' / 'a5.9' --- +bool(false) +--- testing: '123 abc' / '0' --- +bool(false) +--- testing: '123 abc' / '65' --- +float(1.8923076923077) +--- testing: '123 abc' / '-44' --- +float(-2.7954545454545) +--- testing: '123 abc' / '1.2' --- +float(102.5) +--- testing: '123 abc' / '-7.7' --- +float(-15.974025974026) +--- testing: '123 abc' / 'abc' --- +bool(false) +--- testing: '123 abc' / '123abc' --- +int(1) +--- testing: '123 abc' / '123e5' --- +float(1.0E-5) +--- testing: '123 abc' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123 abc' / ' 123abc' --- +int(1) +--- testing: '123 abc' / '123 abc' --- +int(1) +--- testing: '123 abc' / '123abc ' --- +int(1) +--- testing: '123 abc' / '3.4a' --- +float(36.176470588235) +--- testing: '123 abc' / 'a5.9' --- +bool(false) +--- testing: '123abc ' / '0' --- +bool(false) +--- testing: '123abc ' / '65' --- +float(1.8923076923077) +--- testing: '123abc ' / '-44' --- +float(-2.7954545454545) +--- testing: '123abc ' / '1.2' --- +float(102.5) +--- testing: '123abc ' / '-7.7' --- +float(-15.974025974026) +--- testing: '123abc ' / 'abc' --- +bool(false) +--- testing: '123abc ' / '123abc' --- +int(1) +--- testing: '123abc ' / '123e5' --- +float(1.0E-5) +--- testing: '123abc ' / '123e5xyz' --- +float(1.0E-5) +--- testing: '123abc ' / ' 123abc' --- +int(1) +--- testing: '123abc ' / '123 abc' --- +int(1) +--- testing: '123abc ' / '123abc ' --- +int(1) +--- testing: '123abc ' / '3.4a' --- +float(36.176470588235) +--- testing: '123abc ' / 'a5.9' --- +bool(false) +--- testing: '3.4a' / '0' --- +bool(false) +--- testing: '3.4a' / '65' --- +float(0.052307692307692) +--- testing: '3.4a' / '-44' --- +float(-0.077272727272727) +--- testing: '3.4a' / '1.2' --- +float(2.8333333333333) +--- testing: '3.4a' / '-7.7' --- +float(-0.44155844155844) +--- testing: '3.4a' / 'abc' --- +bool(false) +--- testing: '3.4a' / '123abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123e5' --- +float(2.7642276422764E-7) +--- testing: '3.4a' / '123e5xyz' --- +float(2.7642276422764E-7) +--- testing: '3.4a' / ' 123abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123 abc' --- +float(0.027642276422764) +--- testing: '3.4a' / '123abc ' --- +float(0.027642276422764) +--- testing: '3.4a' / '3.4a' --- +float(1) +--- testing: '3.4a' / 'a5.9' --- +bool(false) +--- testing: 'a5.9' / '0' --- +bool(false) +--- testing: 'a5.9' / '65' --- +int(0) +--- testing: 'a5.9' / '-44' --- +int(0) +--- testing: 'a5.9' / '1.2' --- +float(0) +--- testing: 'a5.9' / '-7.7' --- +float(-0) +--- testing: 'a5.9' / 'abc' --- +bool(false) +--- testing: 'a5.9' / '123abc' --- +int(0) +--- testing: 'a5.9' / '123e5' --- +float(0) +--- testing: 'a5.9' / '123e5xyz' --- +float(0) +--- testing: 'a5.9' / ' 123abc' --- +int(0) +--- testing: 'a5.9' / '123 abc' --- +int(0) +--- testing: 'a5.9' / '123abc ' --- +int(0) +--- testing: 'a5.9' / '3.4a' --- +float(0) +--- testing: 'a5.9' / 'a5.9' --- +bool(false) +===DONE=== diff --git a/tests/lang/operators/modulus_basiclong_64bit.phpt b/tests/lang/operators/modulus_basiclong_64bit.phpt new file mode 100644 index 0000000..d75ff1e --- /dev/null +++ b/tests/lang/operators/modulus_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test % operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 % 0 --- +bool(false) +--- testing: 9223372036854775807 % 1 --- +int(0) +--- testing: 9223372036854775807 % -1 --- +int(0) +--- testing: 9223372036854775807 % 7 --- +int(0) +--- testing: 9223372036854775807 % 9 --- +int(7) +--- testing: 9223372036854775807 % 65 --- +int(7) +--- testing: 9223372036854775807 % -44 --- +int(7) +--- testing: 9223372036854775807 % 2147483647 --- +int(1) +--- testing: 9223372036854775807 % 9223372036854775807 --- +int(0) +--- testing: -9223372036854775808 % 0 --- +bool(false) +--- testing: -9223372036854775808 % 1 --- +int(0) +--- testing: -9223372036854775808 % -1 --- +int(0) +--- testing: -9223372036854775808 % 7 --- +int(-1) +--- testing: -9223372036854775808 % 9 --- +int(-8) +--- testing: -9223372036854775808 % 65 --- +int(-8) +--- testing: -9223372036854775808 % -44 --- +int(-8) +--- testing: -9223372036854775808 % 2147483647 --- +int(-2) +--- testing: -9223372036854775808 % 9223372036854775807 --- +int(-1) +--- testing: 2147483647 % 0 --- +bool(false) +--- testing: 2147483647 % 1 --- +int(0) +--- testing: 2147483647 % -1 --- +int(0) +--- testing: 2147483647 % 7 --- +int(1) +--- testing: 2147483647 % 9 --- +int(1) +--- testing: 2147483647 % 65 --- +int(62) +--- testing: 2147483647 % -44 --- +int(23) +--- testing: 2147483647 % 2147483647 --- +int(0) +--- testing: 2147483647 % 9223372036854775807 --- +int(2147483647) +--- testing: -2147483648 % 0 --- +bool(false) +--- testing: -2147483648 % 1 --- +int(0) +--- testing: -2147483648 % -1 --- +int(0) +--- testing: -2147483648 % 7 --- +int(-2) +--- testing: -2147483648 % 9 --- +int(-2) +--- testing: -2147483648 % 65 --- +int(-63) +--- testing: -2147483648 % -44 --- +int(-24) +--- testing: -2147483648 % 2147483647 --- +int(-1) +--- testing: -2147483648 % 9223372036854775807 --- +int(-2147483648) +--- testing: 9223372034707292160 % 0 --- +bool(false) +--- testing: 9223372034707292160 % 1 --- +int(0) +--- testing: 9223372034707292160 % -1 --- +int(0) +--- testing: 9223372034707292160 % 7 --- +int(6) +--- testing: 9223372034707292160 % 9 --- +int(6) +--- testing: 9223372034707292160 % 65 --- +int(10) +--- testing: 9223372034707292160 % -44 --- +int(28) +--- testing: 9223372034707292160 % 2147483647 --- +int(1) +--- testing: 9223372034707292160 % 9223372036854775807 --- +int(9223372034707292160) +--- testing: -9223372034707292160 % 0 --- +bool(false) +--- testing: -9223372034707292160 % 1 --- +int(0) +--- testing: -9223372034707292160 % -1 --- +int(0) +--- testing: -9223372034707292160 % 7 --- +int(-6) +--- testing: -9223372034707292160 % 9 --- +int(-6) +--- testing: -9223372034707292160 % 65 --- +int(-10) +--- testing: -9223372034707292160 % -44 --- +int(-28) +--- testing: -9223372034707292160 % 2147483647 --- +int(-1) +--- testing: -9223372034707292160 % 9223372036854775807 --- +int(-9223372034707292160) +--- testing: 2147483648 % 0 --- +bool(false) +--- testing: 2147483648 % 1 --- +int(0) +--- testing: 2147483648 % -1 --- +int(0) +--- testing: 2147483648 % 7 --- +int(2) +--- testing: 2147483648 % 9 --- +int(2) +--- testing: 2147483648 % 65 --- +int(63) +--- testing: 2147483648 % -44 --- +int(24) +--- testing: 2147483648 % 2147483647 --- +int(1) +--- testing: 2147483648 % 9223372036854775807 --- +int(2147483648) +--- testing: -2147483649 % 0 --- +bool(false) +--- testing: -2147483649 % 1 --- +int(0) +--- testing: -2147483649 % -1 --- +int(0) +--- testing: -2147483649 % 7 --- +int(-3) +--- testing: -2147483649 % 9 --- +int(-3) +--- testing: -2147483649 % 65 --- +int(-64) +--- testing: -2147483649 % -44 --- +int(-25) +--- testing: -2147483649 % 2147483647 --- +int(-2) +--- testing: -2147483649 % 9223372036854775807 --- +int(-2147483649) +--- testing: 4294967294 % 0 --- +bool(false) +--- testing: 4294967294 % 1 --- +int(0) +--- testing: 4294967294 % -1 --- +int(0) +--- testing: 4294967294 % 7 --- +int(2) +--- testing: 4294967294 % 9 --- +int(2) +--- testing: 4294967294 % 65 --- +int(59) +--- testing: 4294967294 % -44 --- +int(2) +--- testing: 4294967294 % 2147483647 --- +int(0) +--- testing: 4294967294 % 9223372036854775807 --- +int(4294967294) +--- testing: 4294967295 % 0 --- +bool(false) +--- testing: 4294967295 % 1 --- +int(0) +--- testing: 4294967295 % -1 --- +int(0) +--- testing: 4294967295 % 7 --- +int(3) +--- testing: 4294967295 % 9 --- +int(3) +--- testing: 4294967295 % 65 --- +int(60) +--- testing: 4294967295 % -44 --- +int(3) +--- testing: 4294967295 % 2147483647 --- +int(1) +--- testing: 4294967295 % 9223372036854775807 --- +int(4294967295) +--- testing: 4294967293 % 0 --- +bool(false) +--- testing: 4294967293 % 1 --- +int(0) +--- testing: 4294967293 % -1 --- +int(0) +--- testing: 4294967293 % 7 --- +int(1) +--- testing: 4294967293 % 9 --- +int(1) +--- testing: 4294967293 % 65 --- +int(58) +--- testing: 4294967293 % -44 --- +int(1) +--- testing: 4294967293 % 2147483647 --- +int(2147483646) +--- testing: 4294967293 % 9223372036854775807 --- +int(4294967293) +--- testing: 9223372036854775806 % 0 --- +bool(false) +--- testing: 9223372036854775806 % 1 --- +int(0) +--- testing: 9223372036854775806 % -1 --- +int(0) +--- testing: 9223372036854775806 % 7 --- +int(6) +--- testing: 9223372036854775806 % 9 --- +int(6) +--- testing: 9223372036854775806 % 65 --- +int(6) +--- testing: 9223372036854775806 % -44 --- +int(6) +--- testing: 9223372036854775806 % 2147483647 --- +int(0) +--- testing: 9223372036854775806 % 9223372036854775807 --- +int(9223372036854775806) +--- testing: 9.2233720368548E+18 % 0 --- +bool(false) +--- testing: 9.2233720368548E+18 % 1 --- +int(0) +--- testing: 9.2233720368548E+18 % -1 --- +int(0) +--- testing: 9.2233720368548E+18 % 7 --- +int(-1) +--- testing: 9.2233720368548E+18 % 9 --- +int(-8) +--- testing: 9.2233720368548E+18 % 65 --- +int(-8) +--- testing: 9.2233720368548E+18 % -44 --- +int(-8) +--- testing: 9.2233720368548E+18 % 2147483647 --- +int(-2) +--- testing: 9.2233720368548E+18 % 9223372036854775807 --- +int(-1) +--- testing: -9223372036854775807 % 0 --- +bool(false) +--- testing: -9223372036854775807 % 1 --- +int(0) +--- testing: -9223372036854775807 % -1 --- +int(0) +--- testing: -9223372036854775807 % 7 --- +int(0) +--- testing: -9223372036854775807 % 9 --- +int(-7) +--- testing: -9223372036854775807 % 65 --- +int(-7) +--- testing: -9223372036854775807 % -44 --- +int(-7) +--- testing: -9223372036854775807 % 2147483647 --- +int(-1) +--- testing: -9223372036854775807 % 9223372036854775807 --- +int(0) +--- testing: -9.2233720368548E+18 % 0 --- +bool(false) +--- testing: -9.2233720368548E+18 % 1 --- +int(0) +--- testing: -9.2233720368548E+18 % -1 --- +int(0) +--- testing: -9.2233720368548E+18 % 7 --- +int(-1) +--- testing: -9.2233720368548E+18 % 9 --- +int(-8) +--- testing: -9.2233720368548E+18 % 65 --- +int(-8) +--- testing: -9.2233720368548E+18 % -44 --- +int(-8) +--- testing: -9.2233720368548E+18 % 2147483647 --- +int(-2) +--- testing: -9.2233720368548E+18 % 9223372036854775807 --- +int(-1) +--- testing: 0 % 9223372036854775807 --- +int(0) +--- testing: 0 % -9223372036854775808 --- +int(0) +--- testing: 0 % 2147483647 --- +int(0) +--- testing: 0 % -2147483648 --- +int(0) +--- testing: 0 % 9223372034707292160 --- +int(0) +--- testing: 0 % -9223372034707292160 --- +int(0) +--- testing: 0 % 2147483648 --- +int(0) +--- testing: 0 % -2147483649 --- +int(0) +--- testing: 0 % 4294967294 --- +int(0) +--- testing: 0 % 4294967295 --- +int(0) +--- testing: 0 % 4294967293 --- +int(0) +--- testing: 0 % 9223372036854775806 --- +int(0) +--- testing: 0 % 9.2233720368548E+18 --- +int(0) +--- testing: 0 % -9223372036854775807 --- +int(0) +--- testing: 0 % -9.2233720368548E+18 --- +int(0) +--- testing: 1 % 9223372036854775807 --- +int(1) +--- testing: 1 % -9223372036854775808 --- +int(1) +--- testing: 1 % 2147483647 --- +int(1) +--- testing: 1 % -2147483648 --- +int(1) +--- testing: 1 % 9223372034707292160 --- +int(1) +--- testing: 1 % -9223372034707292160 --- +int(1) +--- testing: 1 % 2147483648 --- +int(1) +--- testing: 1 % -2147483649 --- +int(1) +--- testing: 1 % 4294967294 --- +int(1) +--- testing: 1 % 4294967295 --- +int(1) +--- testing: 1 % 4294967293 --- +int(1) +--- testing: 1 % 9223372036854775806 --- +int(1) +--- testing: 1 % 9.2233720368548E+18 --- +int(1) +--- testing: 1 % -9223372036854775807 --- +int(1) +--- testing: 1 % -9.2233720368548E+18 --- +int(1) +--- testing: -1 % 9223372036854775807 --- +int(-1) +--- testing: -1 % -9223372036854775808 --- +int(-1) +--- testing: -1 % 2147483647 --- +int(-1) +--- testing: -1 % -2147483648 --- +int(-1) +--- testing: -1 % 9223372034707292160 --- +int(-1) +--- testing: -1 % -9223372034707292160 --- +int(-1) +--- testing: -1 % 2147483648 --- +int(-1) +--- testing: -1 % -2147483649 --- +int(-1) +--- testing: -1 % 4294967294 --- +int(-1) +--- testing: -1 % 4294967295 --- +int(-1) +--- testing: -1 % 4294967293 --- +int(-1) +--- testing: -1 % 9223372036854775806 --- +int(-1) +--- testing: -1 % 9.2233720368548E+18 --- +int(-1) +--- testing: -1 % -9223372036854775807 --- +int(-1) +--- testing: -1 % -9.2233720368548E+18 --- +int(-1) +--- testing: 7 % 9223372036854775807 --- +int(7) +--- testing: 7 % -9223372036854775808 --- +int(7) +--- testing: 7 % 2147483647 --- +int(7) +--- testing: 7 % -2147483648 --- +int(7) +--- testing: 7 % 9223372034707292160 --- +int(7) +--- testing: 7 % -9223372034707292160 --- +int(7) +--- testing: 7 % 2147483648 --- +int(7) +--- testing: 7 % -2147483649 --- +int(7) +--- testing: 7 % 4294967294 --- +int(7) +--- testing: 7 % 4294967295 --- +int(7) +--- testing: 7 % 4294967293 --- +int(7) +--- testing: 7 % 9223372036854775806 --- +int(7) +--- testing: 7 % 9.2233720368548E+18 --- +int(7) +--- testing: 7 % -9223372036854775807 --- +int(7) +--- testing: 7 % -9.2233720368548E+18 --- +int(7) +--- testing: 9 % 9223372036854775807 --- +int(9) +--- testing: 9 % -9223372036854775808 --- +int(9) +--- testing: 9 % 2147483647 --- +int(9) +--- testing: 9 % -2147483648 --- +int(9) +--- testing: 9 % 9223372034707292160 --- +int(9) +--- testing: 9 % -9223372034707292160 --- +int(9) +--- testing: 9 % 2147483648 --- +int(9) +--- testing: 9 % -2147483649 --- +int(9) +--- testing: 9 % 4294967294 --- +int(9) +--- testing: 9 % 4294967295 --- +int(9) +--- testing: 9 % 4294967293 --- +int(9) +--- testing: 9 % 9223372036854775806 --- +int(9) +--- testing: 9 % 9.2233720368548E+18 --- +int(9) +--- testing: 9 % -9223372036854775807 --- +int(9) +--- testing: 9 % -9.2233720368548E+18 --- +int(9) +--- testing: 65 % 9223372036854775807 --- +int(65) +--- testing: 65 % -9223372036854775808 --- +int(65) +--- testing: 65 % 2147483647 --- +int(65) +--- testing: 65 % -2147483648 --- +int(65) +--- testing: 65 % 9223372034707292160 --- +int(65) +--- testing: 65 % -9223372034707292160 --- +int(65) +--- testing: 65 % 2147483648 --- +int(65) +--- testing: 65 % -2147483649 --- +int(65) +--- testing: 65 % 4294967294 --- +int(65) +--- testing: 65 % 4294967295 --- +int(65) +--- testing: 65 % 4294967293 --- +int(65) +--- testing: 65 % 9223372036854775806 --- +int(65) +--- testing: 65 % 9.2233720368548E+18 --- +int(65) +--- testing: 65 % -9223372036854775807 --- +int(65) +--- testing: 65 % -9.2233720368548E+18 --- +int(65) +--- testing: -44 % 9223372036854775807 --- +int(-44) +--- testing: -44 % -9223372036854775808 --- +int(-44) +--- testing: -44 % 2147483647 --- +int(-44) +--- testing: -44 % -2147483648 --- +int(-44) +--- testing: -44 % 9223372034707292160 --- +int(-44) +--- testing: -44 % -9223372034707292160 --- +int(-44) +--- testing: -44 % 2147483648 --- +int(-44) +--- testing: -44 % -2147483649 --- +int(-44) +--- testing: -44 % 4294967294 --- +int(-44) +--- testing: -44 % 4294967295 --- +int(-44) +--- testing: -44 % 4294967293 --- +int(-44) +--- testing: -44 % 9223372036854775806 --- +int(-44) +--- testing: -44 % 9.2233720368548E+18 --- +int(-44) +--- testing: -44 % -9223372036854775807 --- +int(-44) +--- testing: -44 % -9.2233720368548E+18 --- +int(-44) +--- testing: 2147483647 % 9223372036854775807 --- +int(2147483647) +--- testing: 2147483647 % -9223372036854775808 --- +int(2147483647) +--- testing: 2147483647 % 2147483647 --- +int(0) +--- testing: 2147483647 % -2147483648 --- +int(2147483647) +--- testing: 2147483647 % 9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 % -9223372034707292160 --- +int(2147483647) +--- testing: 2147483647 % 2147483648 --- +int(2147483647) +--- testing: 2147483647 % -2147483649 --- +int(2147483647) +--- testing: 2147483647 % 4294967294 --- +int(2147483647) +--- testing: 2147483647 % 4294967295 --- +int(2147483647) +--- testing: 2147483647 % 4294967293 --- +int(2147483647) +--- testing: 2147483647 % 9223372036854775806 --- +int(2147483647) +--- testing: 2147483647 % 9.2233720368548E+18 --- +int(2147483647) +--- testing: 2147483647 % -9223372036854775807 --- +int(2147483647) +--- testing: 2147483647 % -9.2233720368548E+18 --- +int(2147483647) +--- testing: 9223372036854775807 % 9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 % -9223372036854775808 --- +int(9223372036854775807) +--- testing: 9223372036854775807 % 2147483647 --- +int(1) +--- testing: 9223372036854775807 % -2147483648 --- +int(2147483647) +--- testing: 9223372036854775807 % 9223372034707292160 --- +int(2147483647) +--- testing: 9223372036854775807 % -9223372034707292160 --- +int(2147483647) +--- testing: 9223372036854775807 % 2147483648 --- +int(2147483647) +--- testing: 9223372036854775807 % -2147483649 --- +int(1) +--- testing: 9223372036854775807 % 4294967294 --- +int(1) +--- testing: 9223372036854775807 % 4294967295 --- +int(2147483647) +--- testing: 9223372036854775807 % 4294967293 --- +int(2147483650) +--- testing: 9223372036854775807 % 9223372036854775806 --- +int(1) +--- testing: 9223372036854775807 % 9.2233720368548E+18 --- +int(9223372036854775807) +--- testing: 9223372036854775807 % -9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 % -9.2233720368548E+18 --- +int(9223372036854775807) +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/modulus_variationStr.phpt b/tests/lang/operators/modulus_variationStr.phpt new file mode 100644 index 0000000..7b3ce76 --- /dev/null +++ b/tests/lang/operators/modulus_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test % operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' % '0' --- +bool(false) +--- testing: '0' % '65' --- +int(0) +--- testing: '0' % '-44' --- +int(0) +--- testing: '0' % '1.2' --- +int(0) +--- testing: '0' % '-7.7' --- +int(0) +--- testing: '0' % 'abc' --- +bool(false) +--- testing: '0' % '123abc' --- +int(0) +--- testing: '0' % '123e5' --- +int(0) +--- testing: '0' % '123e5xyz' --- +int(0) +--- testing: '0' % ' 123abc' --- +int(0) +--- testing: '0' % '123 abc' --- +int(0) +--- testing: '0' % '123abc ' --- +int(0) +--- testing: '0' % '3.4a' --- +int(0) +--- testing: '0' % 'a5.9' --- +bool(false) +--- testing: '65' % '0' --- +bool(false) +--- testing: '65' % '65' --- +int(0) +--- testing: '65' % '-44' --- +int(21) +--- testing: '65' % '1.2' --- +int(0) +--- testing: '65' % '-7.7' --- +int(2) +--- testing: '65' % 'abc' --- +bool(false) +--- testing: '65' % '123abc' --- +int(65) +--- testing: '65' % '123e5' --- +int(65) +--- testing: '65' % '123e5xyz' --- +int(65) +--- testing: '65' % ' 123abc' --- +int(65) +--- testing: '65' % '123 abc' --- +int(65) +--- testing: '65' % '123abc ' --- +int(65) +--- testing: '65' % '3.4a' --- +int(2) +--- testing: '65' % 'a5.9' --- +bool(false) +--- testing: '-44' % '0' --- +bool(false) +--- testing: '-44' % '65' --- +int(-44) +--- testing: '-44' % '-44' --- +int(0) +--- testing: '-44' % '1.2' --- +int(0) +--- testing: '-44' % '-7.7' --- +int(-2) +--- testing: '-44' % 'abc' --- +bool(false) +--- testing: '-44' % '123abc' --- +int(-44) +--- testing: '-44' % '123e5' --- +int(-44) +--- testing: '-44' % '123e5xyz' --- +int(-44) +--- testing: '-44' % ' 123abc' --- +int(-44) +--- testing: '-44' % '123 abc' --- +int(-44) +--- testing: '-44' % '123abc ' --- +int(-44) +--- testing: '-44' % '3.4a' --- +int(-2) +--- testing: '-44' % 'a5.9' --- +bool(false) +--- testing: '1.2' % '0' --- +bool(false) +--- testing: '1.2' % '65' --- +int(1) +--- testing: '1.2' % '-44' --- +int(1) +--- testing: '1.2' % '1.2' --- +int(0) +--- testing: '1.2' % '-7.7' --- +int(1) +--- testing: '1.2' % 'abc' --- +bool(false) +--- testing: '1.2' % '123abc' --- +int(1) +--- testing: '1.2' % '123e5' --- +int(1) +--- testing: '1.2' % '123e5xyz' --- +int(1) +--- testing: '1.2' % ' 123abc' --- +int(1) +--- testing: '1.2' % '123 abc' --- +int(1) +--- testing: '1.2' % '123abc ' --- +int(1) +--- testing: '1.2' % '3.4a' --- +int(1) +--- testing: '1.2' % 'a5.9' --- +bool(false) +--- testing: '-7.7' % '0' --- +bool(false) +--- testing: '-7.7' % '65' --- +int(-7) +--- testing: '-7.7' % '-44' --- +int(-7) +--- testing: '-7.7' % '1.2' --- +int(0) +--- testing: '-7.7' % '-7.7' --- +int(0) +--- testing: '-7.7' % 'abc' --- +bool(false) +--- testing: '-7.7' % '123abc' --- +int(-7) +--- testing: '-7.7' % '123e5' --- +int(-7) +--- testing: '-7.7' % '123e5xyz' --- +int(-7) +--- testing: '-7.7' % ' 123abc' --- +int(-7) +--- testing: '-7.7' % '123 abc' --- +int(-7) +--- testing: '-7.7' % '123abc ' --- +int(-7) +--- testing: '-7.7' % '3.4a' --- +int(-1) +--- testing: '-7.7' % 'a5.9' --- +bool(false) +--- testing: 'abc' % '0' --- +bool(false) +--- testing: 'abc' % '65' --- +int(0) +--- testing: 'abc' % '-44' --- +int(0) +--- testing: 'abc' % '1.2' --- +int(0) +--- testing: 'abc' % '-7.7' --- +int(0) +--- testing: 'abc' % 'abc' --- +bool(false) +--- testing: 'abc' % '123abc' --- +int(0) +--- testing: 'abc' % '123e5' --- +int(0) +--- testing: 'abc' % '123e5xyz' --- +int(0) +--- testing: 'abc' % ' 123abc' --- +int(0) +--- testing: 'abc' % '123 abc' --- +int(0) +--- testing: 'abc' % '123abc ' --- +int(0) +--- testing: 'abc' % '3.4a' --- +int(0) +--- testing: 'abc' % 'a5.9' --- +bool(false) +--- testing: '123abc' % '0' --- +bool(false) +--- testing: '123abc' % '65' --- +int(58) +--- testing: '123abc' % '-44' --- +int(35) +--- testing: '123abc' % '1.2' --- +int(0) +--- testing: '123abc' % '-7.7' --- +int(4) +--- testing: '123abc' % 'abc' --- +bool(false) +--- testing: '123abc' % '123abc' --- +int(0) +--- testing: '123abc' % '123e5' --- +int(0) +--- testing: '123abc' % '123e5xyz' --- +int(0) +--- testing: '123abc' % ' 123abc' --- +int(0) +--- testing: '123abc' % '123 abc' --- +int(0) +--- testing: '123abc' % '123abc ' --- +int(0) +--- testing: '123abc' % '3.4a' --- +int(0) +--- testing: '123abc' % 'a5.9' --- +bool(false) +--- testing: '123e5' % '0' --- +bool(false) +--- testing: '123e5' % '65' --- +int(58) +--- testing: '123e5' % '-44' --- +int(35) +--- testing: '123e5' % '1.2' --- +int(0) +--- testing: '123e5' % '-7.7' --- +int(4) +--- testing: '123e5' % 'abc' --- +bool(false) +--- testing: '123e5' % '123abc' --- +int(0) +--- testing: '123e5' % '123e5' --- +int(0) +--- testing: '123e5' % '123e5xyz' --- +int(0) +--- testing: '123e5' % ' 123abc' --- +int(0) +--- testing: '123e5' % '123 abc' --- +int(0) +--- testing: '123e5' % '123abc ' --- +int(0) +--- testing: '123e5' % '3.4a' --- +int(0) +--- testing: '123e5' % 'a5.9' --- +bool(false) +--- testing: '123e5xyz' % '0' --- +bool(false) +--- testing: '123e5xyz' % '65' --- +int(58) +--- testing: '123e5xyz' % '-44' --- +int(35) +--- testing: '123e5xyz' % '1.2' --- +int(0) +--- testing: '123e5xyz' % '-7.7' --- +int(4) +--- testing: '123e5xyz' % 'abc' --- +bool(false) +--- testing: '123e5xyz' % '123abc' --- +int(0) +--- testing: '123e5xyz' % '123e5' --- +int(0) +--- testing: '123e5xyz' % '123e5xyz' --- +int(0) +--- testing: '123e5xyz' % ' 123abc' --- +int(0) +--- testing: '123e5xyz' % '123 abc' --- +int(0) +--- testing: '123e5xyz' % '123abc ' --- +int(0) +--- testing: '123e5xyz' % '3.4a' --- +int(0) +--- testing: '123e5xyz' % 'a5.9' --- +bool(false) +--- testing: ' 123abc' % '0' --- +bool(false) +--- testing: ' 123abc' % '65' --- +int(58) +--- testing: ' 123abc' % '-44' --- +int(35) +--- testing: ' 123abc' % '1.2' --- +int(0) +--- testing: ' 123abc' % '-7.7' --- +int(4) +--- testing: ' 123abc' % 'abc' --- +bool(false) +--- testing: ' 123abc' % '123abc' --- +int(0) +--- testing: ' 123abc' % '123e5' --- +int(0) +--- testing: ' 123abc' % '123e5xyz' --- +int(0) +--- testing: ' 123abc' % ' 123abc' --- +int(0) +--- testing: ' 123abc' % '123 abc' --- +int(0) +--- testing: ' 123abc' % '123abc ' --- +int(0) +--- testing: ' 123abc' % '3.4a' --- +int(0) +--- testing: ' 123abc' % 'a5.9' --- +bool(false) +--- testing: '123 abc' % '0' --- +bool(false) +--- testing: '123 abc' % '65' --- +int(58) +--- testing: '123 abc' % '-44' --- +int(35) +--- testing: '123 abc' % '1.2' --- +int(0) +--- testing: '123 abc' % '-7.7' --- +int(4) +--- testing: '123 abc' % 'abc' --- +bool(false) +--- testing: '123 abc' % '123abc' --- +int(0) +--- testing: '123 abc' % '123e5' --- +int(0) +--- testing: '123 abc' % '123e5xyz' --- +int(0) +--- testing: '123 abc' % ' 123abc' --- +int(0) +--- testing: '123 abc' % '123 abc' --- +int(0) +--- testing: '123 abc' % '123abc ' --- +int(0) +--- testing: '123 abc' % '3.4a' --- +int(0) +--- testing: '123 abc' % 'a5.9' --- +bool(false) +--- testing: '123abc ' % '0' --- +bool(false) +--- testing: '123abc ' % '65' --- +int(58) +--- testing: '123abc ' % '-44' --- +int(35) +--- testing: '123abc ' % '1.2' --- +int(0) +--- testing: '123abc ' % '-7.7' --- +int(4) +--- testing: '123abc ' % 'abc' --- +bool(false) +--- testing: '123abc ' % '123abc' --- +int(0) +--- testing: '123abc ' % '123e5' --- +int(0) +--- testing: '123abc ' % '123e5xyz' --- +int(0) +--- testing: '123abc ' % ' 123abc' --- +int(0) +--- testing: '123abc ' % '123 abc' --- +int(0) +--- testing: '123abc ' % '123abc ' --- +int(0) +--- testing: '123abc ' % '3.4a' --- +int(0) +--- testing: '123abc ' % 'a5.9' --- +bool(false) +--- testing: '3.4a' % '0' --- +bool(false) +--- testing: '3.4a' % '65' --- +int(3) +--- testing: '3.4a' % '-44' --- +int(3) +--- testing: '3.4a' % '1.2' --- +int(0) +--- testing: '3.4a' % '-7.7' --- +int(3) +--- testing: '3.4a' % 'abc' --- +bool(false) +--- testing: '3.4a' % '123abc' --- +int(3) +--- testing: '3.4a' % '123e5' --- +int(3) +--- testing: '3.4a' % '123e5xyz' --- +int(3) +--- testing: '3.4a' % ' 123abc' --- +int(3) +--- testing: '3.4a' % '123 abc' --- +int(3) +--- testing: '3.4a' % '123abc ' --- +int(3) +--- testing: '3.4a' % '3.4a' --- +int(0) +--- testing: '3.4a' % 'a5.9' --- +bool(false) +--- testing: 'a5.9' % '0' --- +bool(false) +--- testing: 'a5.9' % '65' --- +int(0) +--- testing: 'a5.9' % '-44' --- +int(0) +--- testing: 'a5.9' % '1.2' --- +int(0) +--- testing: 'a5.9' % '-7.7' --- +int(0) +--- testing: 'a5.9' % 'abc' --- +bool(false) +--- testing: 'a5.9' % '123abc' --- +int(0) +--- testing: 'a5.9' % '123e5' --- +int(0) +--- testing: 'a5.9' % '123e5xyz' --- +int(0) +--- testing: 'a5.9' % ' 123abc' --- +int(0) +--- testing: 'a5.9' % '123 abc' --- +int(0) +--- testing: 'a5.9' % '123abc ' --- +int(0) +--- testing: 'a5.9' % '3.4a' --- +int(0) +--- testing: 'a5.9' % 'a5.9' --- +bool(false) +===DONE=== diff --git a/tests/lang/operators/multiply_basiclong_64bit.phpt b/tests/lang/operators/multiply_basiclong_64bit.phpt new file mode 100644 index 0000000..4c7077b --- /dev/null +++ b/tests/lang/operators/multiply_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test * operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 * 0 --- +int(0) +--- testing: 9223372036854775807 * 1 --- +int(9223372036854775807) +--- testing: 9223372036854775807 * -1 --- +int(-9223372036854775807) +--- testing: 9223372036854775807 * 7 --- +float(6.4563604257983E+19) +--- testing: 9223372036854775807 * 9 --- +float(8.3010348331693E+19) +--- testing: 9223372036854775807 * 65 --- +float(5.9951918239556E+20) +--- testing: 9223372036854775807 * -44 --- +float(-4.0582836962161E+20) +--- testing: 9223372036854775807 * 2147483647 --- +float(1.9807040619343E+28) +--- testing: 9223372036854775807 * 9223372036854775807 --- +float(8.5070591730235E+37) +--- testing: -9223372036854775808 * 0 --- +int(0) +--- testing: -9223372036854775808 * 1 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 * -1 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775808 * 7 --- +float(-6.4563604257983E+19) +--- testing: -9223372036854775808 * 9 --- +float(-8.3010348331693E+19) +--- testing: -9223372036854775808 * 65 --- +float(-5.9951918239556E+20) +--- testing: -9223372036854775808 * -44 --- +float(4.0582836962161E+20) +--- testing: -9223372036854775808 * 2147483647 --- +float(-1.9807040619343E+28) +--- testing: -9223372036854775808 * 9223372036854775807 --- +float(-8.5070591730235E+37) +--- testing: 2147483647 * 0 --- +int(0) +--- testing: 2147483647 * 1 --- +int(2147483647) +--- testing: 2147483647 * -1 --- +int(-2147483647) +--- testing: 2147483647 * 7 --- +int(15032385529) +--- testing: 2147483647 * 9 --- +int(19327352823) +--- testing: 2147483647 * 65 --- +int(139586437055) +--- testing: 2147483647 * -44 --- +int(-94489280468) +--- testing: 2147483647 * 2147483647 --- +int(4611686014132420609) +--- testing: 2147483647 * 9223372036854775807 --- +float(1.9807040619343E+28) +--- testing: -2147483648 * 0 --- +int(0) +--- testing: -2147483648 * 1 --- +int(-2147483648) +--- testing: -2147483648 * -1 --- +int(2147483648) +--- testing: -2147483648 * 7 --- +int(-15032385536) +--- testing: -2147483648 * 9 --- +int(-19327352832) +--- testing: -2147483648 * 65 --- +int(-139586437120) +--- testing: -2147483648 * -44 --- +int(94489280512) +--- testing: -2147483648 * 2147483647 --- +int(-4611686016279904256) +--- testing: -2147483648 * 9223372036854775807 --- +float(-1.9807040628566E+28) +--- testing: 9223372034707292160 * 0 --- +int(0) +--- testing: 9223372034707292160 * 1 --- +int(9223372034707292160) +--- testing: 9223372034707292160 * -1 --- +int(-9223372034707292160) +--- testing: 9223372034707292160 * 7 --- +float(6.4563604242951E+19) +--- testing: 9223372034707292160 * 9 --- +float(8.3010348312366E+19) +--- testing: 9223372034707292160 * 65 --- +float(5.9951918225597E+20) +--- testing: 9223372034707292160 * -44 --- +float(-4.0582836952712E+20) +--- testing: 9223372034707292160 * 2147483647 --- +float(1.9807040614731E+28) +--- testing: 9223372034707292160 * 9223372036854775807 --- +float(8.5070591710428E+37) +--- testing: -9223372034707292160 * 0 --- +int(0) +--- testing: -9223372034707292160 * 1 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 * -1 --- +int(9223372034707292160) +--- testing: -9223372034707292160 * 7 --- +float(-6.4563604242951E+19) +--- testing: -9223372034707292160 * 9 --- +float(-8.3010348312366E+19) +--- testing: -9223372034707292160 * 65 --- +float(-5.9951918225597E+20) +--- testing: -9223372034707292160 * -44 --- +float(4.0582836952712E+20) +--- testing: -9223372034707292160 * 2147483647 --- +float(-1.9807040614731E+28) +--- testing: -9223372034707292160 * 9223372036854775807 --- +float(-8.5070591710428E+37) +--- testing: 2147483648 * 0 --- +int(0) +--- testing: 2147483648 * 1 --- +int(2147483648) +--- testing: 2147483648 * -1 --- +int(-2147483648) +--- testing: 2147483648 * 7 --- +int(15032385536) +--- testing: 2147483648 * 9 --- +int(19327352832) +--- testing: 2147483648 * 65 --- +int(139586437120) +--- testing: 2147483648 * -44 --- +int(-94489280512) +--- testing: 2147483648 * 2147483647 --- +int(4611686016279904256) +--- testing: 2147483648 * 9223372036854775807 --- +float(1.9807040628566E+28) +--- testing: -2147483649 * 0 --- +int(0) +--- testing: -2147483649 * 1 --- +int(-2147483649) +--- testing: -2147483649 * -1 --- +int(2147483649) +--- testing: -2147483649 * 7 --- +int(-15032385543) +--- testing: -2147483649 * 9 --- +int(-19327352841) +--- testing: -2147483649 * 65 --- +int(-139586437185) +--- testing: -2147483649 * -44 --- +int(94489280556) +--- testing: -2147483649 * 2147483647 --- +int(-4611686018427387903) +--- testing: -2147483649 * 9223372036854775807 --- +float(-1.9807040637789E+28) +--- testing: 4294967294 * 0 --- +int(0) +--- testing: 4294967294 * 1 --- +int(4294967294) +--- testing: 4294967294 * -1 --- +int(-4294967294) +--- testing: 4294967294 * 7 --- +int(30064771058) +--- testing: 4294967294 * 9 --- +int(38654705646) +--- testing: 4294967294 * 65 --- +int(279172874110) +--- testing: 4294967294 * -44 --- +int(-188978560936) +--- testing: 4294967294 * 2147483647 --- +int(9223372028264841218) +--- testing: 4294967294 * 9223372036854775807 --- +float(3.9614081238685E+28) +--- testing: 4294967295 * 0 --- +int(0) +--- testing: 4294967295 * 1 --- +int(4294967295) +--- testing: 4294967295 * -1 --- +int(-4294967295) +--- testing: 4294967295 * 7 --- +int(30064771065) +--- testing: 4294967295 * 9 --- +int(38654705655) +--- testing: 4294967295 * 65 --- +int(279172874175) +--- testing: 4294967295 * -44 --- +int(-188978560980) +--- testing: 4294967295 * 2147483647 --- +int(9223372030412324865) +--- testing: 4294967295 * 9223372036854775807 --- +float(3.9614081247909E+28) +--- testing: 4294967293 * 0 --- +int(0) +--- testing: 4294967293 * 1 --- +int(4294967293) +--- testing: 4294967293 * -1 --- +int(-4294967293) +--- testing: 4294967293 * 7 --- +int(30064771051) +--- testing: 4294967293 * 9 --- +int(38654705637) +--- testing: 4294967293 * 65 --- +int(279172874045) +--- testing: 4294967293 * -44 --- +int(-188978560892) +--- testing: 4294967293 * 2147483647 --- +int(9223372026117357571) +--- testing: 4294967293 * 9223372036854775807 --- +float(3.9614081229462E+28) +--- testing: 9223372036854775806 * 0 --- +int(0) +--- testing: 9223372036854775806 * 1 --- +int(9223372036854775806) +--- testing: 9223372036854775806 * -1 --- +int(-9223372036854775806) +--- testing: 9223372036854775806 * 7 --- +float(6.4563604257983E+19) +--- testing: 9223372036854775806 * 9 --- +float(8.3010348331693E+19) +--- testing: 9223372036854775806 * 65 --- +float(5.9951918239556E+20) +--- testing: 9223372036854775806 * -44 --- +float(-4.0582836962161E+20) +--- testing: 9223372036854775806 * 2147483647 --- +float(1.9807040619343E+28) +--- testing: 9223372036854775806 * 9223372036854775807 --- +float(8.5070591730235E+37) +--- testing: 9.2233720368548E+18 * 0 --- +float(0) +--- testing: 9.2233720368548E+18 * 1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 * -1 --- +float(-9.2233720368548E+18) +--- testing: 9.2233720368548E+18 * 7 --- +float(6.4563604257983E+19) +--- testing: 9.2233720368548E+18 * 9 --- +float(8.3010348331693E+19) +--- testing: 9.2233720368548E+18 * 65 --- +float(5.9951918239556E+20) +--- testing: 9.2233720368548E+18 * -44 --- +float(-4.0582836962161E+20) +--- testing: 9.2233720368548E+18 * 2147483647 --- +float(1.9807040619343E+28) +--- testing: 9.2233720368548E+18 * 9223372036854775807 --- +float(8.5070591730235E+37) +--- testing: -9223372036854775807 * 0 --- +int(0) +--- testing: -9223372036854775807 * 1 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 * -1 --- +int(9223372036854775807) +--- testing: -9223372036854775807 * 7 --- +float(-6.4563604257983E+19) +--- testing: -9223372036854775807 * 9 --- +float(-8.3010348331693E+19) +--- testing: -9223372036854775807 * 65 --- +float(-5.9951918239556E+20) +--- testing: -9223372036854775807 * -44 --- +float(4.0582836962161E+20) +--- testing: -9223372036854775807 * 2147483647 --- +float(-1.9807040619343E+28) +--- testing: -9223372036854775807 * 9223372036854775807 --- +float(-8.5070591730235E+37) +--- testing: -9.2233720368548E+18 * 0 --- +float(-0) +--- testing: -9.2233720368548E+18 * 1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 * -1 --- +float(9.2233720368548E+18) +--- testing: -9.2233720368548E+18 * 7 --- +float(-6.4563604257983E+19) +--- testing: -9.2233720368548E+18 * 9 --- +float(-8.3010348331693E+19) +--- testing: -9.2233720368548E+18 * 65 --- +float(-5.9951918239556E+20) +--- testing: -9.2233720368548E+18 * -44 --- +float(4.0582836962161E+20) +--- testing: -9.2233720368548E+18 * 2147483647 --- +float(-1.9807040619343E+28) +--- testing: -9.2233720368548E+18 * 9223372036854775807 --- +float(-8.5070591730235E+37) +--- testing: 0 * 9223372036854775807 --- +int(0) +--- testing: 0 * -9223372036854775808 --- +int(0) +--- testing: 0 * 2147483647 --- +int(0) +--- testing: 0 * -2147483648 --- +int(0) +--- testing: 0 * 9223372034707292160 --- +int(0) +--- testing: 0 * -9223372034707292160 --- +int(0) +--- testing: 0 * 2147483648 --- +int(0) +--- testing: 0 * -2147483649 --- +int(0) +--- testing: 0 * 4294967294 --- +int(0) +--- testing: 0 * 4294967295 --- +int(0) +--- testing: 0 * 4294967293 --- +int(0) +--- testing: 0 * 9223372036854775806 --- +int(0) +--- testing: 0 * 9.2233720368548E+18 --- +float(0) +--- testing: 0 * -9223372036854775807 --- +int(0) +--- testing: 0 * -9.2233720368548E+18 --- +float(-0) +--- testing: 1 * 9223372036854775807 --- +int(9223372036854775807) +--- testing: 1 * -9223372036854775808 --- +int(-9223372036854775808) +--- testing: 1 * 2147483647 --- +int(2147483647) +--- testing: 1 * -2147483648 --- +int(-2147483648) +--- testing: 1 * 9223372034707292160 --- +int(9223372034707292160) +--- testing: 1 * -9223372034707292160 --- +int(-9223372034707292160) +--- testing: 1 * 2147483648 --- +int(2147483648) +--- testing: 1 * -2147483649 --- +int(-2147483649) +--- testing: 1 * 4294967294 --- +int(4294967294) +--- testing: 1 * 4294967295 --- +int(4294967295) +--- testing: 1 * 4294967293 --- +int(4294967293) +--- testing: 1 * 9223372036854775806 --- +int(9223372036854775806) +--- testing: 1 * 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 1 * -9223372036854775807 --- +int(-9223372036854775807) +--- testing: 1 * -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -1 * 9223372036854775807 --- +int(-9223372036854775807) +--- testing: -1 * -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: -1 * 2147483647 --- +int(-2147483647) +--- testing: -1 * -2147483648 --- +int(2147483648) +--- testing: -1 * 9223372034707292160 --- +int(-9223372034707292160) +--- testing: -1 * -9223372034707292160 --- +int(9223372034707292160) +--- testing: -1 * 2147483648 --- +int(-2147483648) +--- testing: -1 * -2147483649 --- +int(2147483649) +--- testing: -1 * 4294967294 --- +int(-4294967294) +--- testing: -1 * 4294967295 --- +int(-4294967295) +--- testing: -1 * 4294967293 --- +int(-4294967293) +--- testing: -1 * 9223372036854775806 --- +int(-9223372036854775806) +--- testing: -1 * 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -1 * -9223372036854775807 --- +int(9223372036854775807) +--- testing: -1 * -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 7 * 9223372036854775807 --- +float(6.4563604257983E+19) +--- testing: 7 * -9223372036854775808 --- +float(-6.4563604257983E+19) +--- testing: 7 * 2147483647 --- +int(15032385529) +--- testing: 7 * -2147483648 --- +int(-15032385536) +--- testing: 7 * 9223372034707292160 --- +float(6.4563604242951E+19) +--- testing: 7 * -9223372034707292160 --- +float(-6.4563604242951E+19) +--- testing: 7 * 2147483648 --- +int(15032385536) +--- testing: 7 * -2147483649 --- +int(-15032385543) +--- testing: 7 * 4294967294 --- +int(30064771058) +--- testing: 7 * 4294967295 --- +int(30064771065) +--- testing: 7 * 4294967293 --- +int(30064771051) +--- testing: 7 * 9223372036854775806 --- +float(6.4563604257983E+19) +--- testing: 7 * 9.2233720368548E+18 --- +float(6.4563604257983E+19) +--- testing: 7 * -9223372036854775807 --- +float(-6.4563604257983E+19) +--- testing: 7 * -9.2233720368548E+18 --- +float(-6.4563604257983E+19) +--- testing: 9 * 9223372036854775807 --- +float(8.3010348331693E+19) +--- testing: 9 * -9223372036854775808 --- +float(-8.3010348331693E+19) +--- testing: 9 * 2147483647 --- +int(19327352823) +--- testing: 9 * -2147483648 --- +int(-19327352832) +--- testing: 9 * 9223372034707292160 --- +float(8.3010348312366E+19) +--- testing: 9 * -9223372034707292160 --- +float(-8.3010348312366E+19) +--- testing: 9 * 2147483648 --- +int(19327352832) +--- testing: 9 * -2147483649 --- +int(-19327352841) +--- testing: 9 * 4294967294 --- +int(38654705646) +--- testing: 9 * 4294967295 --- +int(38654705655) +--- testing: 9 * 4294967293 --- +int(38654705637) +--- testing: 9 * 9223372036854775806 --- +float(8.3010348331693E+19) +--- testing: 9 * 9.2233720368548E+18 --- +float(8.3010348331693E+19) +--- testing: 9 * -9223372036854775807 --- +float(-8.3010348331693E+19) +--- testing: 9 * -9.2233720368548E+18 --- +float(-8.3010348331693E+19) +--- testing: 65 * 9223372036854775807 --- +float(5.9951918239556E+20) +--- testing: 65 * -9223372036854775808 --- +float(-5.9951918239556E+20) +--- testing: 65 * 2147483647 --- +int(139586437055) +--- testing: 65 * -2147483648 --- +int(-139586437120) +--- testing: 65 * 9223372034707292160 --- +float(5.9951918225597E+20) +--- testing: 65 * -9223372034707292160 --- +float(-5.9951918225597E+20) +--- testing: 65 * 2147483648 --- +int(139586437120) +--- testing: 65 * -2147483649 --- +int(-139586437185) +--- testing: 65 * 4294967294 --- +int(279172874110) +--- testing: 65 * 4294967295 --- +int(279172874175) +--- testing: 65 * 4294967293 --- +int(279172874045) +--- testing: 65 * 9223372036854775806 --- +float(5.9951918239556E+20) +--- testing: 65 * 9.2233720368548E+18 --- +float(5.9951918239556E+20) +--- testing: 65 * -9223372036854775807 --- +float(-5.9951918239556E+20) +--- testing: 65 * -9.2233720368548E+18 --- +float(-5.9951918239556E+20) +--- testing: -44 * 9223372036854775807 --- +float(-4.0582836962161E+20) +--- testing: -44 * -9223372036854775808 --- +float(4.0582836962161E+20) +--- testing: -44 * 2147483647 --- +int(-94489280468) +--- testing: -44 * -2147483648 --- +int(94489280512) +--- testing: -44 * 9223372034707292160 --- +float(-4.0582836952712E+20) +--- testing: -44 * -9223372034707292160 --- +float(4.0582836952712E+20) +--- testing: -44 * 2147483648 --- +int(-94489280512) +--- testing: -44 * -2147483649 --- +int(94489280556) +--- testing: -44 * 4294967294 --- +int(-188978560936) +--- testing: -44 * 4294967295 --- +int(-188978560980) +--- testing: -44 * 4294967293 --- +int(-188978560892) +--- testing: -44 * 9223372036854775806 --- +float(-4.0582836962161E+20) +--- testing: -44 * 9.2233720368548E+18 --- +float(-4.0582836962161E+20) +--- testing: -44 * -9223372036854775807 --- +float(4.0582836962161E+20) +--- testing: -44 * -9.2233720368548E+18 --- +float(4.0582836962161E+20) +--- testing: 2147483647 * 9223372036854775807 --- +float(1.9807040619343E+28) +--- testing: 2147483647 * -9223372036854775808 --- +float(-1.9807040619343E+28) +--- testing: 2147483647 * 2147483647 --- +int(4611686014132420609) +--- testing: 2147483647 * -2147483648 --- +int(-4611686016279904256) +--- testing: 2147483647 * 9223372034707292160 --- +float(1.9807040614731E+28) +--- testing: 2147483647 * -9223372034707292160 --- +float(-1.9807040614731E+28) +--- testing: 2147483647 * 2147483648 --- +int(4611686016279904256) +--- testing: 2147483647 * -2147483649 --- +int(-4611686018427387903) +--- testing: 2147483647 * 4294967294 --- +int(9223372028264841218) +--- testing: 2147483647 * 4294967295 --- +int(9223372030412324865) +--- testing: 2147483647 * 4294967293 --- +int(9223372026117357571) +--- testing: 2147483647 * 9223372036854775806 --- +float(1.9807040619343E+28) +--- testing: 2147483647 * 9.2233720368548E+18 --- +float(1.9807040619343E+28) +--- testing: 2147483647 * -9223372036854775807 --- +float(-1.9807040619343E+28) +--- testing: 2147483647 * -9.2233720368548E+18 --- +float(-1.9807040619343E+28) +--- testing: 9223372036854775807 * 9223372036854775807 --- +float(8.5070591730235E+37) +--- testing: 9223372036854775807 * -9223372036854775808 --- +float(-8.5070591730235E+37) +--- testing: 9223372036854775807 * 2147483647 --- +float(1.9807040619343E+28) +--- testing: 9223372036854775807 * -2147483648 --- +float(-1.9807040628566E+28) +--- testing: 9223372036854775807 * 9223372034707292160 --- +float(8.5070591710428E+37) +--- testing: 9223372036854775807 * -9223372034707292160 --- +float(-8.5070591710428E+37) +--- testing: 9223372036854775807 * 2147483648 --- +float(1.9807040628566E+28) +--- testing: 9223372036854775807 * -2147483649 --- +float(-1.9807040637789E+28) +--- testing: 9223372036854775807 * 4294967294 --- +float(3.9614081238685E+28) +--- testing: 9223372036854775807 * 4294967295 --- +float(3.9614081247909E+28) +--- testing: 9223372036854775807 * 4294967293 --- +float(3.9614081229462E+28) +--- testing: 9223372036854775807 * 9223372036854775806 --- +float(8.5070591730235E+37) +--- testing: 9223372036854775807 * 9.2233720368548E+18 --- +float(8.5070591730235E+37) +--- testing: 9223372036854775807 * -9223372036854775807 --- +float(-8.5070591730235E+37) +--- testing: 9223372036854775807 * -9.2233720368548E+18 --- +float(-8.5070591730235E+37) +===DONE=== diff --git a/tests/lang/operators/multiply_variationStr.phpt b/tests/lang/operators/multiply_variationStr.phpt new file mode 100644 index 0000000..30d5f79 --- /dev/null +++ b/tests/lang/operators/multiply_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test * operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' * '0' --- +int(0) +--- testing: '0' * '65' --- +int(0) +--- testing: '0' * '-44' --- +int(0) +--- testing: '0' * '1.2' --- +float(0) +--- testing: '0' * '-7.7' --- +float(-0) +--- testing: '0' * 'abc' --- +int(0) +--- testing: '0' * '123abc' --- +int(0) +--- testing: '0' * '123e5' --- +float(0) +--- testing: '0' * '123e5xyz' --- +float(0) +--- testing: '0' * ' 123abc' --- +int(0) +--- testing: '0' * '123 abc' --- +int(0) +--- testing: '0' * '123abc ' --- +int(0) +--- testing: '0' * '3.4a' --- +float(0) +--- testing: '0' * 'a5.9' --- +int(0) +--- testing: '65' * '0' --- +int(0) +--- testing: '65' * '65' --- +int(4225) +--- testing: '65' * '-44' --- +int(-2860) +--- testing: '65' * '1.2' --- +float(78) +--- testing: '65' * '-7.7' --- +float(-500.5) +--- testing: '65' * 'abc' --- +int(0) +--- testing: '65' * '123abc' --- +int(7995) +--- testing: '65' * '123e5' --- +float(799500000) +--- testing: '65' * '123e5xyz' --- +float(799500000) +--- testing: '65' * ' 123abc' --- +int(7995) +--- testing: '65' * '123 abc' --- +int(7995) +--- testing: '65' * '123abc ' --- +int(7995) +--- testing: '65' * '3.4a' --- +float(221) +--- testing: '65' * 'a5.9' --- +int(0) +--- testing: '-44' * '0' --- +int(0) +--- testing: '-44' * '65' --- +int(-2860) +--- testing: '-44' * '-44' --- +int(1936) +--- testing: '-44' * '1.2' --- +float(-52.8) +--- testing: '-44' * '-7.7' --- +float(338.8) +--- testing: '-44' * 'abc' --- +int(0) +--- testing: '-44' * '123abc' --- +int(-5412) +--- testing: '-44' * '123e5' --- +float(-541200000) +--- testing: '-44' * '123e5xyz' --- +float(-541200000) +--- testing: '-44' * ' 123abc' --- +int(-5412) +--- testing: '-44' * '123 abc' --- +int(-5412) +--- testing: '-44' * '123abc ' --- +int(-5412) +--- testing: '-44' * '3.4a' --- +float(-149.6) +--- testing: '-44' * 'a5.9' --- +int(0) +--- testing: '1.2' * '0' --- +float(0) +--- testing: '1.2' * '65' --- +float(78) +--- testing: '1.2' * '-44' --- +float(-52.8) +--- testing: '1.2' * '1.2' --- +float(1.44) +--- testing: '1.2' * '-7.7' --- +float(-9.24) +--- testing: '1.2' * 'abc' --- +float(0) +--- testing: '1.2' * '123abc' --- +float(147.6) +--- testing: '1.2' * '123e5' --- +float(14760000) +--- testing: '1.2' * '123e5xyz' --- +float(14760000) +--- testing: '1.2' * ' 123abc' --- +float(147.6) +--- testing: '1.2' * '123 abc' --- +float(147.6) +--- testing: '1.2' * '123abc ' --- +float(147.6) +--- testing: '1.2' * '3.4a' --- +float(4.08) +--- testing: '1.2' * 'a5.9' --- +float(0) +--- testing: '-7.7' * '0' --- +float(-0) +--- testing: '-7.7' * '65' --- +float(-500.5) +--- testing: '-7.7' * '-44' --- +float(338.8) +--- testing: '-7.7' * '1.2' --- +float(-9.24) +--- testing: '-7.7' * '-7.7' --- +float(59.29) +--- testing: '-7.7' * 'abc' --- +float(-0) +--- testing: '-7.7' * '123abc' --- +float(-947.1) +--- testing: '-7.7' * '123e5' --- +float(-94710000) +--- testing: '-7.7' * '123e5xyz' --- +float(-94710000) +--- testing: '-7.7' * ' 123abc' --- +float(-947.1) +--- testing: '-7.7' * '123 abc' --- +float(-947.1) +--- testing: '-7.7' * '123abc ' --- +float(-947.1) +--- testing: '-7.7' * '3.4a' --- +float(-26.18) +--- testing: '-7.7' * 'a5.9' --- +float(-0) +--- testing: 'abc' * '0' --- +int(0) +--- testing: 'abc' * '65' --- +int(0) +--- testing: 'abc' * '-44' --- +int(0) +--- testing: 'abc' * '1.2' --- +float(0) +--- testing: 'abc' * '-7.7' --- +float(-0) +--- testing: 'abc' * 'abc' --- +int(0) +--- testing: 'abc' * '123abc' --- +int(0) +--- testing: 'abc' * '123e5' --- +float(0) +--- testing: 'abc' * '123e5xyz' --- +float(0) +--- testing: 'abc' * ' 123abc' --- +int(0) +--- testing: 'abc' * '123 abc' --- +int(0) +--- testing: 'abc' * '123abc ' --- +int(0) +--- testing: 'abc' * '3.4a' --- +float(0) +--- testing: 'abc' * 'a5.9' --- +int(0) +--- testing: '123abc' * '0' --- +int(0) +--- testing: '123abc' * '65' --- +int(7995) +--- testing: '123abc' * '-44' --- +int(-5412) +--- testing: '123abc' * '1.2' --- +float(147.6) +--- testing: '123abc' * '-7.7' --- +float(-947.1) +--- testing: '123abc' * 'abc' --- +int(0) +--- testing: '123abc' * '123abc' --- +int(15129) +--- testing: '123abc' * '123e5' --- +float(1512900000) +--- testing: '123abc' * '123e5xyz' --- +float(1512900000) +--- testing: '123abc' * ' 123abc' --- +int(15129) +--- testing: '123abc' * '123 abc' --- +int(15129) +--- testing: '123abc' * '123abc ' --- +int(15129) +--- testing: '123abc' * '3.4a' --- +float(418.2) +--- testing: '123abc' * 'a5.9' --- +int(0) +--- testing: '123e5' * '0' --- +float(0) +--- testing: '123e5' * '65' --- +float(799500000) +--- testing: '123e5' * '-44' --- +float(-541200000) +--- testing: '123e5' * '1.2' --- +float(14760000) +--- testing: '123e5' * '-7.7' --- +float(-94710000) +--- testing: '123e5' * 'abc' --- +float(0) +--- testing: '123e5' * '123abc' --- +float(1512900000) +--- testing: '123e5' * '123e5' --- +float(1.5129E+14) +--- testing: '123e5' * '123e5xyz' --- +float(1.5129E+14) +--- testing: '123e5' * ' 123abc' --- +float(1512900000) +--- testing: '123e5' * '123 abc' --- +float(1512900000) +--- testing: '123e5' * '123abc ' --- +float(1512900000) +--- testing: '123e5' * '3.4a' --- +float(41820000) +--- testing: '123e5' * 'a5.9' --- +float(0) +--- testing: '123e5xyz' * '0' --- +float(0) +--- testing: '123e5xyz' * '65' --- +float(799500000) +--- testing: '123e5xyz' * '-44' --- +float(-541200000) +--- testing: '123e5xyz' * '1.2' --- +float(14760000) +--- testing: '123e5xyz' * '-7.7' --- +float(-94710000) +--- testing: '123e5xyz' * 'abc' --- +float(0) +--- testing: '123e5xyz' * '123abc' --- +float(1512900000) +--- testing: '123e5xyz' * '123e5' --- +float(1.5129E+14) +--- testing: '123e5xyz' * '123e5xyz' --- +float(1.5129E+14) +--- testing: '123e5xyz' * ' 123abc' --- +float(1512900000) +--- testing: '123e5xyz' * '123 abc' --- +float(1512900000) +--- testing: '123e5xyz' * '123abc ' --- +float(1512900000) +--- testing: '123e5xyz' * '3.4a' --- +float(41820000) +--- testing: '123e5xyz' * 'a5.9' --- +float(0) +--- testing: ' 123abc' * '0' --- +int(0) +--- testing: ' 123abc' * '65' --- +int(7995) +--- testing: ' 123abc' * '-44' --- +int(-5412) +--- testing: ' 123abc' * '1.2' --- +float(147.6) +--- testing: ' 123abc' * '-7.7' --- +float(-947.1) +--- testing: ' 123abc' * 'abc' --- +int(0) +--- testing: ' 123abc' * '123abc' --- +int(15129) +--- testing: ' 123abc' * '123e5' --- +float(1512900000) +--- testing: ' 123abc' * '123e5xyz' --- +float(1512900000) +--- testing: ' 123abc' * ' 123abc' --- +int(15129) +--- testing: ' 123abc' * '123 abc' --- +int(15129) +--- testing: ' 123abc' * '123abc ' --- +int(15129) +--- testing: ' 123abc' * '3.4a' --- +float(418.2) +--- testing: ' 123abc' * 'a5.9' --- +int(0) +--- testing: '123 abc' * '0' --- +int(0) +--- testing: '123 abc' * '65' --- +int(7995) +--- testing: '123 abc' * '-44' --- +int(-5412) +--- testing: '123 abc' * '1.2' --- +float(147.6) +--- testing: '123 abc' * '-7.7' --- +float(-947.1) +--- testing: '123 abc' * 'abc' --- +int(0) +--- testing: '123 abc' * '123abc' --- +int(15129) +--- testing: '123 abc' * '123e5' --- +float(1512900000) +--- testing: '123 abc' * '123e5xyz' --- +float(1512900000) +--- testing: '123 abc' * ' 123abc' --- +int(15129) +--- testing: '123 abc' * '123 abc' --- +int(15129) +--- testing: '123 abc' * '123abc ' --- +int(15129) +--- testing: '123 abc' * '3.4a' --- +float(418.2) +--- testing: '123 abc' * 'a5.9' --- +int(0) +--- testing: '123abc ' * '0' --- +int(0) +--- testing: '123abc ' * '65' --- +int(7995) +--- testing: '123abc ' * '-44' --- +int(-5412) +--- testing: '123abc ' * '1.2' --- +float(147.6) +--- testing: '123abc ' * '-7.7' --- +float(-947.1) +--- testing: '123abc ' * 'abc' --- +int(0) +--- testing: '123abc ' * '123abc' --- +int(15129) +--- testing: '123abc ' * '123e5' --- +float(1512900000) +--- testing: '123abc ' * '123e5xyz' --- +float(1512900000) +--- testing: '123abc ' * ' 123abc' --- +int(15129) +--- testing: '123abc ' * '123 abc' --- +int(15129) +--- testing: '123abc ' * '123abc ' --- +int(15129) +--- testing: '123abc ' * '3.4a' --- +float(418.2) +--- testing: '123abc ' * 'a5.9' --- +int(0) +--- testing: '3.4a' * '0' --- +float(0) +--- testing: '3.4a' * '65' --- +float(221) +--- testing: '3.4a' * '-44' --- +float(-149.6) +--- testing: '3.4a' * '1.2' --- +float(4.08) +--- testing: '3.4a' * '-7.7' --- +float(-26.18) +--- testing: '3.4a' * 'abc' --- +float(0) +--- testing: '3.4a' * '123abc' --- +float(418.2) +--- testing: '3.4a' * '123e5' --- +float(41820000) +--- testing: '3.4a' * '123e5xyz' --- +float(41820000) +--- testing: '3.4a' * ' 123abc' --- +float(418.2) +--- testing: '3.4a' * '123 abc' --- +float(418.2) +--- testing: '3.4a' * '123abc ' --- +float(418.2) +--- testing: '3.4a' * '3.4a' --- +float(11.56) +--- testing: '3.4a' * 'a5.9' --- +float(0) +--- testing: 'a5.9' * '0' --- +int(0) +--- testing: 'a5.9' * '65' --- +int(0) +--- testing: 'a5.9' * '-44' --- +int(0) +--- testing: 'a5.9' * '1.2' --- +float(0) +--- testing: 'a5.9' * '-7.7' --- +float(-0) +--- testing: 'a5.9' * 'abc' --- +int(0) +--- testing: 'a5.9' * '123abc' --- +int(0) +--- testing: 'a5.9' * '123e5' --- +float(0) +--- testing: 'a5.9' * '123e5xyz' --- +float(0) +--- testing: 'a5.9' * ' 123abc' --- +int(0) +--- testing: 'a5.9' * '123 abc' --- +int(0) +--- testing: 'a5.9' * '123abc ' --- +int(0) +--- testing: 'a5.9' * '3.4a' --- +float(0) +--- testing: 'a5.9' * 'a5.9' --- +int(0) +===DONE=== diff --git a/tests/lang/operators/negate_basiclong_64bit.phpt b/tests/lang/operators/negate_basiclong_64bit.phpt new file mode 100644 index 0000000..e0cf10d --- /dev/null +++ b/tests/lang/operators/negate_basiclong_64bit.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test -N operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +int(-9223372036854775807) +--- testing: -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 2147483647 --- +int(-2147483647) +--- testing: -2147483648 --- +int(2147483648) +--- testing: 9223372034707292160 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 --- +int(9223372034707292160) +--- testing: 2147483648 --- +int(-2147483648) +--- testing: -2147483649 --- +int(2147483649) +--- testing: 4294967294 --- +int(-4294967294) +--- testing: 4294967295 --- +int(-4294967295) +--- testing: 4294967293 --- +int(-4294967293) +--- testing: 9223372036854775806 --- +int(-9223372036854775806) +--- testing: 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775807 --- +int(9223372036854775807) +--- testing: -9.2233720368548E+18 --- +float(9.2233720368548E+18) +===DONE=== diff --git a/tests/lang/operators/negate_variationStr.phpt b/tests/lang/operators/negate_variationStr.phpt new file mode 100644 index 0000000..a25bdda --- /dev/null +++ b/tests/lang/operators/negate_variationStr.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test -N operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +int(0) +--- testing: '65' --- +int(-65) +--- testing: '-44' --- +int(44) +--- testing: '1.2' --- +float(-1.2) +--- testing: '-7.7' --- +float(7.7) +--- testing: 'abc' --- +int(0) +--- testing: '123abc' --- +int(-123) +--- testing: '123e5' --- +float(-12300000) +--- testing: '123e5xyz' --- +float(-12300000) +--- testing: ' 123abc' --- +int(-123) +--- testing: '123 abc' --- +int(-123) +--- testing: '123abc ' --- +int(-123) +--- testing: '3.4a' --- +float(-3.4) +--- testing: 'a5.9' --- +int(0) +===DONE=== diff --git a/tests/lang/operators/operator_equals_basic.phpt b/tests/lang/operators/operator_equals_basic.phpt new file mode 100644 index 0000000..1b42fc3 --- /dev/null +++ b/tests/lang/operators/operator_equals_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test == operator : different types +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_equals_variation.phpt b/tests/lang/operators/operator_equals_variation.phpt new file mode 100644 index 0000000..60e6abb --- /dev/null +++ b/tests/lang/operators/operator_equals_variation.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test == operator : max int 32bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_equals_variation_64bit.phpt b/tests/lang/operators/operator_equals_variation_64bit.phpt new file mode 100644 index 0000000..b521735 --- /dev/null +++ b/tests/lang/operators/operator_equals_variation_64bit.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test == operator : max int 64bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_basic.phpt b/tests/lang/operators/operator_gt_basic.phpt new file mode 100644 index 0000000..06fbcee --- /dev/null +++ b/tests/lang/operators/operator_gt_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test > operator : different types +--FILE-- + true for example +// also note that a string of "0" is converted to false but a string of "0.0" is converted to true +// false cannot be tested as 0 can never be > 0 or 1 + true, $valid_false, $valid_true, + $int1, $valid_int1, $invalid_int1, + $int2, $valid_int2, $invalid_int2, + $float1, $valid_float1, $invalid_float1, + $float2, $valid_float2, $invalid_float2 +); + +$failed = false; +for ($i = 0; $i < count($toCompare); $i +=3) { + $typeToTest = $toCompare[$i]; + $valid_compares = $toCompare[$i + 1]; + $invalid_compares = $toCompare[$i + 2]; + + foreach($valid_compares as $compareVal) { + if ($typeToTest > $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTest' <= '$compareVal'\n"; + $failed = true; + } + } + + foreach($invalid_compares as $compareVal) { + if ($typeToTest > $compareVal) { + echo "FAILED: '$typeToTest' > '$compareVal'\n"; + $failed = true; + } + } + +} +if ($failed == false) { + echo "Test Passed\n"; +} +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_or_equal_basic.phpt b/tests/lang/operators/operator_gt_or_equal_basic.phpt new file mode 100644 index 0000000..02a561c --- /dev/null +++ b/tests/lang/operators/operator_gt_or_equal_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test >= operator : different types +--FILE-- += $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTest' < '$compareVal'\n"; + $failed = true; + } + } + + if ($invalid_compares != NULL) { + foreach($invalid_compares as $compareVal) { + if ($typeToTest >= $compareVal) { + echo "FAILED: '$typeToTest' >= '$compareVal'\n"; + $failed = true; + } + } + } + +} +if ($failed == false) { + echo "Test Passed\n"; +} +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_or_equal_variation.phpt b/tests/lang/operators/operator_gt_or_equal_variation.phpt new file mode 100644 index 0000000..c4253b5 --- /dev/null +++ b/tests/lang/operators/operator_gt_or_equal_variation.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test >= operator : max int 32bit range +--SKIPIF-- + +--FILE-- += $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTestVal' < '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) { + $typeToTestVal = $invalidGtOrEqual[$i]; + $compares = $invalidGtOrEqual[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal >= $compareVal) { + echo "FAILED: '$typeToTestVal' >= '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt b/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt new file mode 100644 index 0000000..a2f7aa4 --- /dev/null +++ b/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test >= operator : max int 64bit range +--SKIPIF-- + +--FILE-- += $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTestVal' < '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) { + $typeToTestVal = $invalidGtOrEqual[$i]; + $compares = $invalidGtOrEqual[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal >= $compareVal) { + echo "FAILED: '$typeToTestVal' >= '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_variation.phpt b/tests/lang/operators/operator_gt_variation.phpt new file mode 100644 index 0000000..a158824 --- /dev/null +++ b/tests/lang/operators/operator_gt_variation.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test > operator : max int 32bit range +--SKIPIF-- + +--FILE-- + $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTestVal' <= '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidGreaterThan); $i +=2) { + $typeToTestVal = $invalidGreaterThan[$i]; + $compares = $invalidGreaterThan[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal > $compareVal) { + echo "FAILED: '$typeToTestVal' > '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_gt_variation_64bit.phpt b/tests/lang/operators/operator_gt_variation_64bit.phpt new file mode 100644 index 0000000..6223e07 --- /dev/null +++ b/tests/lang/operators/operator_gt_variation_64bit.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test > operator : max int 64bit range +--SKIPIF-- + +--FILE-- + $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTestVal' <= '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidGreaterThan); $i +=2) { + $typeToTestVal = $invalidGreaterThan[$i]; + $compares = $invalidGreaterThan[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal > $compareVal) { + echo "FAILED: '$typeToTestVal' > '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_identical_basic.phpt b/tests/lang/operators/operator_identical_basic.phpt new file mode 100644 index 0000000..a4cd8a0 --- /dev/null +++ b/tests/lang/operators/operator_identical_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test === operator : different types +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_identical_variation.phpt b/tests/lang/operators/operator_identical_variation.phpt new file mode 100644 index 0000000..76639c7 --- /dev/null +++ b/tests/lang/operators/operator_identical_variation.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test === operator : max int 32bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_identical_variation_64bit.phpt b/tests/lang/operators/operator_identical_variation_64bit.phpt new file mode 100644 index 0000000..0909c44 --- /dev/null +++ b/tests/lang/operators/operator_identical_variation_64bit.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test === operator : max int 64bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_basic.phpt b/tests/lang/operators/operator_lt_basic.phpt new file mode 100644 index 0000000..137adf2 --- /dev/null +++ b/tests/lang/operators/operator_lt_basic.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test < operator : different types +--FILE-- += '$compareVal'\n"; + $failed = true; + } + } + + foreach($invalid_compares as $compareVal) { + if ($typeToTest < $compareVal) { + echo "FAILED: '$typeToTest' < '$compareVal'\n"; + $failed = true; + } + } + +} +if ($failed == false) { + echo "Test Passed\n"; +} +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_or_equal_basic.phpt b/tests/lang/operators/operator_lt_or_equal_basic.phpt new file mode 100644 index 0000000..381b813 --- /dev/null +++ b/tests/lang/operators/operator_lt_or_equal_basic.phpt @@ -0,0 +1,64 @@ +--TEST-- +Test <= operator : different types +--FILE-- + '$compareVal'\n"; + $failed = true; + } + } + + if ($invalid_compares != NULL) { + foreach($invalid_compares as $compareVal) { + if ($typeToTest <= $compareVal) { + echo "FAILED: '$typeToTest' <= '$compareVal'\n"; + $failed = true; + } + } + } + +} +if ($failed == false) { + echo "Test Passed\n"; +} +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_or_equal_variation.phpt b/tests/lang/operators/operator_lt_or_equal_variation.phpt new file mode 100644 index 0000000..8f5f945 --- /dev/null +++ b/tests/lang/operators/operator_lt_or_equal_variation.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test <= operator : max int 32bit range +--SKIPIF-- + +--FILE-- + '$compareVal'\n"; + $failed = true; + } + } +} +// test invalid values +for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) { + $typeToTestVal = $invalidLtOrEqual[$i]; + $compares = $invalidLtOrEqual[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal <= $compareVal) { + echo "FAILED: '$typeToTestVal' <= '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt b/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt new file mode 100644 index 0000000..03c974f --- /dev/null +++ b/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test <= operator : max int 64bit range +--SKIPIF-- + +--FILE-- + '$compareVal'\n"; + $failed = true; + } + } +} +// test invalid values +for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) { + $typeToTestVal = $invalidLtOrEqual[$i]; + $compares = $invalidLtOrEqual[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal <= $compareVal) { + echo "FAILED: '$typeToTestVal' <= '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_variation.phpt b/tests/lang/operators/operator_lt_variation.phpt new file mode 100644 index 0000000..a2a8f6a --- /dev/null +++ b/tests/lang/operators/operator_lt_variation.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test < operator : max int 32bit range +--SKIPIF-- + +--FILE-- += '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidLessThan); $i +=2) { + $typeToTestVal = $invalidLessThan[$i]; + $compares = $invalidLessThan[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal < $compareVal) { + echo "FAILED: '$typeToTestVal' < '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_lt_variation_64bit.phpt b/tests/lang/operators/operator_lt_variation_64bit.phpt new file mode 100644 index 0000000..172ef39 --- /dev/null +++ b/tests/lang/operators/operator_lt_variation_64bit.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test < operator : max int 64bit range +--SKIPIF-- + +--FILE-- += '$compareVal'\n"; + $failed = true; + } + } +} +// test for invalid values +for ($i = 0; $i < count($invalidLessThan); $i +=2) { + $typeToTestVal = $invalidLessThan[$i]; + $compares = $invalidLessThan[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal < $compareVal) { + echo "FAILED: '$typeToTestVal' < '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notequals_basic.phpt b/tests/lang/operators/operator_notequals_basic.phpt new file mode 100644 index 0000000..059c99d --- /dev/null +++ b/tests/lang/operators/operator_notequals_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test != operator : different types +--FILE-- + $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTest' == '$compareVal'\n"; + $failed = true; + } + } + + foreach($invalid_compares as $compareVal) { + if ($typeToTest != $compareVal || $typeToTest <> $compareVal) { + echo "FAILED: '$typeToTest' != '$compareVal'\n"; + $failed = true; + } + } + +} +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notequals_variation.phpt b/tests/lang/operators/operator_notequals_variation.phpt new file mode 100644 index 0000000..a7827b4 --- /dev/null +++ b/tests/lang/operators/operator_notequals_variation.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test != operator : max int 32bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notequals_variation_64bit.phpt b/tests/lang/operators/operator_notequals_variation_64bit.phpt new file mode 100644 index 0000000..ed26b52 --- /dev/null +++ b/tests/lang/operators/operator_notequals_variation_64bit.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test == operator : max int 64bit range +--SKIPIF-- + +--FILE-- + $compareVal) { + // do nothing + } + else { + echo "FAILED: '$typeToTestVal' == '$compareVal'\n"; + $failed = true; + } + } +} +// test invalid values +for ($i = 0; $i < count($invalidNotEquals); $i +=2) { + $typeToTestVal = $invalidNotEquals[$i]; + $compares = $invalidNotEquals[$i + 1]; + foreach($compares as $compareVal) { + if ($typeToTestVal != $compareVal || $typeToTestVal <> $compareVal) { + echo "FAILED: '$typeToTestVal' != '$compareVal'\n"; + $failed = true; + } + } +} + +if ($failed == false) { + echo "Test Passed\n"; +} + +?> +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notidentical_basic.phpt b/tests/lang/operators/operator_notidentical_basic.phpt new file mode 100644 index 0000000..d433289 --- /dev/null +++ b/tests/lang/operators/operator_notidentical_basic.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test !== operator : different types +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notidentical_variation.phpt b/tests/lang/operators/operator_notidentical_variation.phpt new file mode 100644 index 0000000..9af6f8d --- /dev/null +++ b/tests/lang/operators/operator_notidentical_variation.phpt @@ -0,0 +1,64 @@ +--TEST-- +Test !== operator : max int 32bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/operator_notidentical_variation_64bit.phpt b/tests/lang/operators/operator_notidentical_variation_64bit.phpt new file mode 100644 index 0000000..e8f2c7e --- /dev/null +++ b/tests/lang/operators/operator_notidentical_variation_64bit.phpt @@ -0,0 +1,65 @@ +--TEST-- +Test !== operator : max int 64bit range +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Test Passed +===DONE=== \ No newline at end of file diff --git a/tests/lang/operators/postdec_basiclong_64bit.phpt b/tests/lang/operators/postdec_basiclong_64bit.phpt new file mode 100644 index 0000000..9875df8 --- /dev/null +++ b/tests/lang/operators/postdec_basiclong_64bit.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test N-- operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +int(9223372036854775806) +--- testing: -9223372036854775808 --- +float(-9.2233720368548E+18) +--- testing: 2147483647 --- +int(2147483646) +--- testing: -2147483648 --- +int(-2147483649) +--- testing: 9223372034707292160 --- +int(9223372034707292159) +--- testing: -9223372034707292160 --- +int(-9223372034707292161) +--- testing: 2147483648 --- +int(2147483647) +--- testing: -2147483649 --- +int(-2147483650) +--- testing: 4294967294 --- +int(4294967293) +--- testing: 4294967295 --- +int(4294967294) +--- testing: 4294967293 --- +int(4294967292) +--- testing: 9223372036854775806 --- +int(9223372036854775805) +--- testing: 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775807 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +===DONE=== diff --git a/tests/lang/operators/postdec_variationStr.phpt b/tests/lang/operators/postdec_variationStr.phpt new file mode 100644 index 0000000..ee5a8cd --- /dev/null +++ b/tests/lang/operators/postdec_variationStr.phpt @@ -0,0 +1,49 @@ +--TEST-- +Test N-- operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +int(-1) +--- testing: '65' --- +int(64) +--- testing: '-44' --- +int(-45) +--- testing: '1.2' --- +float(0.2) +--- testing: '-7.7' --- +float(-8.7) +--- testing: 'abc' --- +string(3) "abc" +--- testing: '123abc' --- +string(6) "123abc" +--- testing: '123e5' --- +float(12299999) +--- testing: '123e5xyz' --- +string(8) "123e5xyz" +--- testing: ' 123abc' --- +string(7) " 123abc" +--- testing: '123 abc' --- +string(7) "123 abc" +--- testing: '123abc ' --- +string(7) "123abc " +--- testing: '3.4a' --- +string(4) "3.4a" +--- testing: 'a5.9' --- +string(4) "a5.9" +===DONE=== diff --git a/tests/lang/operators/postinc_basiclong_64bit.phpt b/tests/lang/operators/postinc_basiclong_64bit.phpt new file mode 100644 index 0000000..494259a --- /dev/null +++ b/tests/lang/operators/postinc_basiclong_64bit.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test N++ operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775808 --- +int(-9223372036854775807) +--- testing: 2147483647 --- +int(2147483648) +--- testing: -2147483648 --- +int(-2147483647) +--- testing: 9223372034707292160 --- +int(9223372034707292161) +--- testing: -9223372034707292160 --- +int(-9223372034707292159) +--- testing: 2147483648 --- +int(2147483649) +--- testing: -2147483649 --- +int(-2147483648) +--- testing: 4294967294 --- +int(4294967295) +--- testing: 4294967295 --- +int(4294967296) +--- testing: 4294967293 --- +int(4294967294) +--- testing: 9223372036854775806 --- +int(9223372036854775807) +--- testing: 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775807 --- +int(-9223372036854775806) +--- testing: -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +===DONE=== diff --git a/tests/lang/operators/postinc_variationStr.phpt b/tests/lang/operators/postinc_variationStr.phpt new file mode 100644 index 0000000..6fbe804 --- /dev/null +++ b/tests/lang/operators/postinc_variationStr.phpt @@ -0,0 +1,49 @@ +--TEST-- +Test N++ operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +int(1) +--- testing: '65' --- +int(66) +--- testing: '-44' --- +int(-43) +--- testing: '1.2' --- +float(2.2) +--- testing: '-7.7' --- +float(-6.7) +--- testing: 'abc' --- +string(3) "abd" +--- testing: '123abc' --- +string(6) "123abd" +--- testing: '123e5' --- +float(12300001) +--- testing: '123e5xyz' --- +string(8) "123e5xza" +--- testing: ' 123abc' --- +string(7) " 123abd" +--- testing: '123 abc' --- +string(7) "123 abd" +--- testing: '123abc ' --- +string(7) "123abc " +--- testing: '3.4a' --- +string(4) "3.4b" +--- testing: 'a5.9' --- +string(4) "a5.0" +===DONE=== diff --git a/tests/lang/operators/predec_basiclong_64bit.phpt b/tests/lang/operators/predec_basiclong_64bit.phpt new file mode 100644 index 0000000..c1b15fd --- /dev/null +++ b/tests/lang/operators/predec_basiclong_64bit.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test --N operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +int(9223372036854775806) +--- testing: -9223372036854775808 --- +float(-9.2233720368548E+18) +--- testing: 2147483647 --- +int(2147483646) +--- testing: -2147483648 --- +int(-2147483649) +--- testing: 9223372034707292160 --- +int(9223372034707292159) +--- testing: -9223372034707292160 --- +int(-9223372034707292161) +--- testing: 2147483648 --- +int(2147483647) +--- testing: -2147483649 --- +int(-2147483650) +--- testing: 4294967294 --- +int(4294967293) +--- testing: 4294967295 --- +int(4294967294) +--- testing: 4294967293 --- +int(4294967292) +--- testing: 9223372036854775806 --- +int(9223372036854775805) +--- testing: 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775807 --- +int(-9223372036854775808) +--- testing: -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +===DONE=== diff --git a/tests/lang/operators/predec_variationStr.phpt b/tests/lang/operators/predec_variationStr.phpt new file mode 100644 index 0000000..c7fb574 --- /dev/null +++ b/tests/lang/operators/predec_variationStr.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test --N operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +int(-1) +--- testing: '65' --- +int(64) +--- testing: '-44' --- +int(-45) +--- testing: '1.2' --- +float(0.2) +--- testing: '-7.7' --- +float(-8.7) +--- testing: 'abc' --- +string(3) "abc" +--- testing: '123abc' --- +string(6) "123abc" +--- testing: '123e5' --- +float(12299999) +--- testing: '123e5xyz' --- +string(8) "123e5xyz" +--- testing: ' 123abc' --- +string(7) " 123abc" +--- testing: '123 abc' --- +string(7) "123 abc" +--- testing: '123abc ' --- +string(7) "123abc " +--- testing: '3.4a' --- +string(4) "3.4a" +--- testing: 'a5.9' --- +string(4) "a5.9" +===DONE=== diff --git a/tests/lang/operators/preinc_basiclong_64bit.phpt b/tests/lang/operators/preinc_basiclong_64bit.phpt new file mode 100644 index 0000000..599aa4e --- /dev/null +++ b/tests/lang/operators/preinc_basiclong_64bit.phpt @@ -0,0 +1,60 @@ +--TEST-- +Test ++N operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775808 --- +int(-9223372036854775807) +--- testing: 2147483647 --- +int(2147483648) +--- testing: -2147483648 --- +int(-2147483647) +--- testing: 9223372034707292160 --- +int(9223372034707292161) +--- testing: -9223372034707292160 --- +int(-9223372034707292159) +--- testing: 2147483648 --- +int(2147483649) +--- testing: -2147483649 --- +int(-2147483648) +--- testing: 4294967294 --- +int(4294967295) +--- testing: 4294967295 --- +int(4294967296) +--- testing: 4294967293 --- +int(4294967294) +--- testing: 9223372036854775806 --- +int(9223372036854775807) +--- testing: 9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -9223372036854775807 --- +int(-9223372036854775806) +--- testing: -9.2233720368548E+18 --- +float(-9.2233720368548E+18) +===DONE=== diff --git a/tests/lang/operators/preinc_variationStr.phpt b/tests/lang/operators/preinc_variationStr.phpt new file mode 100644 index 0000000..010a237 --- /dev/null +++ b/tests/lang/operators/preinc_variationStr.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test ++N operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' --- +int(1) +--- testing: '65' --- +int(66) +--- testing: '-44' --- +int(-43) +--- testing: '1.2' --- +float(2.2) +--- testing: '-7.7' --- +float(-6.7) +--- testing: 'abc' --- +string(3) "abd" +--- testing: '123abc' --- +string(6) "123abd" +--- testing: '123e5' --- +float(12300001) +--- testing: '123e5xyz' --- +string(8) "123e5xza" +--- testing: ' 123abc' --- +string(7) " 123abd" +--- testing: '123 abc' --- +string(7) "123 abd" +--- testing: '123abc ' --- +string(7) "123abc " +--- testing: '3.4a' --- +string(4) "3.4b" +--- testing: 'a5.9' --- +string(4) "a5.0" +===DONE=== diff --git a/tests/lang/operators/subtract_basiclong_64bit.phpt b/tests/lang/operators/subtract_basiclong_64bit.phpt new file mode 100644 index 0000000..f52b951 --- /dev/null +++ b/tests/lang/operators/subtract_basiclong_64bit.phpt @@ -0,0 +1,582 @@ +--TEST-- +Test - operator : 64bit long tests +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: 9223372036854775807 - 0 --- +int(9223372036854775807) +--- testing: 9223372036854775807 - 1 --- +int(9223372036854775806) +--- testing: 9223372036854775807 - -1 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 - 7 --- +int(9223372036854775800) +--- testing: 9223372036854775807 - 9 --- +int(9223372036854775798) +--- testing: 9223372036854775807 - 65 --- +int(9223372036854775742) +--- testing: 9223372036854775807 - -44 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775807 - 2147483647 --- +int(9223372034707292160) +--- testing: 9223372036854775807 - 9223372036854775807 --- +int(0) +--- testing: -9223372036854775808 - 0 --- +int(-9223372036854775808) +--- testing: -9223372036854775808 - 1 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 - -1 --- +int(-9223372036854775807) +--- testing: -9223372036854775808 - 7 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 - 9 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 - 65 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775808 - -44 --- +int(-9223372036854775764) +--- testing: -9223372036854775808 - 2147483647 --- +float(-9.2233720390023E+18) +--- testing: -9223372036854775808 - 9223372036854775807 --- +float(-1.844674407371E+19) +--- testing: 2147483647 - 0 --- +int(2147483647) +--- testing: 2147483647 - 1 --- +int(2147483646) +--- testing: 2147483647 - -1 --- +int(2147483648) +--- testing: 2147483647 - 7 --- +int(2147483640) +--- testing: 2147483647 - 9 --- +int(2147483638) +--- testing: 2147483647 - 65 --- +int(2147483582) +--- testing: 2147483647 - -44 --- +int(2147483691) +--- testing: 2147483647 - 2147483647 --- +int(0) +--- testing: 2147483647 - 9223372036854775807 --- +int(-9223372034707292160) +--- testing: -2147483648 - 0 --- +int(-2147483648) +--- testing: -2147483648 - 1 --- +int(-2147483649) +--- testing: -2147483648 - -1 --- +int(-2147483647) +--- testing: -2147483648 - 7 --- +int(-2147483655) +--- testing: -2147483648 - 9 --- +int(-2147483657) +--- testing: -2147483648 - 65 --- +int(-2147483713) +--- testing: -2147483648 - -44 --- +int(-2147483604) +--- testing: -2147483648 - 2147483647 --- +int(-4294967295) +--- testing: -2147483648 - 9223372036854775807 --- +float(-9.2233720390023E+18) +--- testing: 9223372034707292160 - 0 --- +int(9223372034707292160) +--- testing: 9223372034707292160 - 1 --- +int(9223372034707292159) +--- testing: 9223372034707292160 - -1 --- +int(9223372034707292161) +--- testing: 9223372034707292160 - 7 --- +int(9223372034707292153) +--- testing: 9223372034707292160 - 9 --- +int(9223372034707292151) +--- testing: 9223372034707292160 - 65 --- +int(9223372034707292095) +--- testing: 9223372034707292160 - -44 --- +int(9223372034707292204) +--- testing: 9223372034707292160 - 2147483647 --- +int(9223372032559808513) +--- testing: 9223372034707292160 - 9223372036854775807 --- +int(-2147483647) +--- testing: -9223372034707292160 - 0 --- +int(-9223372034707292160) +--- testing: -9223372034707292160 - 1 --- +int(-9223372034707292161) +--- testing: -9223372034707292160 - -1 --- +int(-9223372034707292159) +--- testing: -9223372034707292160 - 7 --- +int(-9223372034707292167) +--- testing: -9223372034707292160 - 9 --- +int(-9223372034707292169) +--- testing: -9223372034707292160 - 65 --- +int(-9223372034707292225) +--- testing: -9223372034707292160 - -44 --- +int(-9223372034707292116) +--- testing: -9223372034707292160 - 2147483647 --- +int(-9223372036854775807) +--- testing: -9223372034707292160 - 9223372036854775807 --- +float(-1.8446744071562E+19) +--- testing: 2147483648 - 0 --- +int(2147483648) +--- testing: 2147483648 - 1 --- +int(2147483647) +--- testing: 2147483648 - -1 --- +int(2147483649) +--- testing: 2147483648 - 7 --- +int(2147483641) +--- testing: 2147483648 - 9 --- +int(2147483639) +--- testing: 2147483648 - 65 --- +int(2147483583) +--- testing: 2147483648 - -44 --- +int(2147483692) +--- testing: 2147483648 - 2147483647 --- +int(1) +--- testing: 2147483648 - 9223372036854775807 --- +int(-9223372034707292159) +--- testing: -2147483649 - 0 --- +int(-2147483649) +--- testing: -2147483649 - 1 --- +int(-2147483650) +--- testing: -2147483649 - -1 --- +int(-2147483648) +--- testing: -2147483649 - 7 --- +int(-2147483656) +--- testing: -2147483649 - 9 --- +int(-2147483658) +--- testing: -2147483649 - 65 --- +int(-2147483714) +--- testing: -2147483649 - -44 --- +int(-2147483605) +--- testing: -2147483649 - 2147483647 --- +int(-4294967296) +--- testing: -2147483649 - 9223372036854775807 --- +float(-9.2233720390023E+18) +--- testing: 4294967294 - 0 --- +int(4294967294) +--- testing: 4294967294 - 1 --- +int(4294967293) +--- testing: 4294967294 - -1 --- +int(4294967295) +--- testing: 4294967294 - 7 --- +int(4294967287) +--- testing: 4294967294 - 9 --- +int(4294967285) +--- testing: 4294967294 - 65 --- +int(4294967229) +--- testing: 4294967294 - -44 --- +int(4294967338) +--- testing: 4294967294 - 2147483647 --- +int(2147483647) +--- testing: 4294967294 - 9223372036854775807 --- +int(-9223372032559808513) +--- testing: 4294967295 - 0 --- +int(4294967295) +--- testing: 4294967295 - 1 --- +int(4294967294) +--- testing: 4294967295 - -1 --- +int(4294967296) +--- testing: 4294967295 - 7 --- +int(4294967288) +--- testing: 4294967295 - 9 --- +int(4294967286) +--- testing: 4294967295 - 65 --- +int(4294967230) +--- testing: 4294967295 - -44 --- +int(4294967339) +--- testing: 4294967295 - 2147483647 --- +int(2147483648) +--- testing: 4294967295 - 9223372036854775807 --- +int(-9223372032559808512) +--- testing: 4294967293 - 0 --- +int(4294967293) +--- testing: 4294967293 - 1 --- +int(4294967292) +--- testing: 4294967293 - -1 --- +int(4294967294) +--- testing: 4294967293 - 7 --- +int(4294967286) +--- testing: 4294967293 - 9 --- +int(4294967284) +--- testing: 4294967293 - 65 --- +int(4294967228) +--- testing: 4294967293 - -44 --- +int(4294967337) +--- testing: 4294967293 - 2147483647 --- +int(2147483646) +--- testing: 4294967293 - 9223372036854775807 --- +int(-9223372032559808514) +--- testing: 9223372036854775806 - 0 --- +int(9223372036854775806) +--- testing: 9223372036854775806 - 1 --- +int(9223372036854775805) +--- testing: 9223372036854775806 - -1 --- +int(9223372036854775807) +--- testing: 9223372036854775806 - 7 --- +int(9223372036854775799) +--- testing: 9223372036854775806 - 9 --- +int(9223372036854775797) +--- testing: 9223372036854775806 - 65 --- +int(9223372036854775741) +--- testing: 9223372036854775806 - -44 --- +float(9.2233720368548E+18) +--- testing: 9223372036854775806 - 2147483647 --- +int(9223372034707292159) +--- testing: 9223372036854775806 - 9223372036854775807 --- +int(-1) +--- testing: 9.2233720368548E+18 - 0 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - 1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - -1 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - 7 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - 9 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - 65 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - -44 --- +float(9.2233720368548E+18) +--- testing: 9.2233720368548E+18 - 2147483647 --- +float(9.2233720347073E+18) +--- testing: 9.2233720368548E+18 - 9223372036854775807 --- +float(0) +--- testing: -9223372036854775807 - 0 --- +int(-9223372036854775807) +--- testing: -9223372036854775807 - 1 --- +int(-9223372036854775808) +--- testing: -9223372036854775807 - -1 --- +int(-9223372036854775806) +--- testing: -9223372036854775807 - 7 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775807 - 9 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775807 - 65 --- +float(-9.2233720368548E+18) +--- testing: -9223372036854775807 - -44 --- +int(-9223372036854775763) +--- testing: -9223372036854775807 - 2147483647 --- +float(-9.2233720390023E+18) +--- testing: -9223372036854775807 - 9223372036854775807 --- +float(-1.844674407371E+19) +--- testing: -9.2233720368548E+18 - 0 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - 1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - -1 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - 7 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - 9 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - 65 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - -44 --- +float(-9.2233720368548E+18) +--- testing: -9.2233720368548E+18 - 2147483647 --- +float(-9.2233720390023E+18) +--- testing: -9.2233720368548E+18 - 9223372036854775807 --- +float(-1.844674407371E+19) +--- testing: 0 - 9223372036854775807 --- +int(-9223372036854775807) +--- testing: 0 - -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 0 - 2147483647 --- +int(-2147483647) +--- testing: 0 - -2147483648 --- +int(2147483648) +--- testing: 0 - 9223372034707292160 --- +int(-9223372034707292160) +--- testing: 0 - -9223372034707292160 --- +int(9223372034707292160) +--- testing: 0 - 2147483648 --- +int(-2147483648) +--- testing: 0 - -2147483649 --- +int(2147483649) +--- testing: 0 - 4294967294 --- +int(-4294967294) +--- testing: 0 - 4294967295 --- +int(-4294967295) +--- testing: 0 - 4294967293 --- +int(-4294967293) +--- testing: 0 - 9223372036854775806 --- +int(-9223372036854775806) +--- testing: 0 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 0 - -9223372036854775807 --- +int(9223372036854775807) +--- testing: 0 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 1 - 9223372036854775807 --- +int(-9223372036854775806) +--- testing: 1 - -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 1 - 2147483647 --- +int(-2147483646) +--- testing: 1 - -2147483648 --- +int(2147483649) +--- testing: 1 - 9223372034707292160 --- +int(-9223372034707292159) +--- testing: 1 - -9223372034707292160 --- +int(9223372034707292161) +--- testing: 1 - 2147483648 --- +int(-2147483647) +--- testing: 1 - -2147483649 --- +int(2147483650) +--- testing: 1 - 4294967294 --- +int(-4294967293) +--- testing: 1 - 4294967295 --- +int(-4294967294) +--- testing: 1 - 4294967293 --- +int(-4294967292) +--- testing: 1 - 9223372036854775806 --- +int(-9223372036854775805) +--- testing: 1 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 1 - -9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 1 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -1 - 9223372036854775807 --- +int(-9223372036854775808) +--- testing: -1 - -9223372036854775808 --- +int(9223372036854775807) +--- testing: -1 - 2147483647 --- +int(-2147483648) +--- testing: -1 - -2147483648 --- +int(2147483647) +--- testing: -1 - 9223372034707292160 --- +int(-9223372034707292161) +--- testing: -1 - -9223372034707292160 --- +int(9223372034707292159) +--- testing: -1 - 2147483648 --- +int(-2147483649) +--- testing: -1 - -2147483649 --- +int(2147483648) +--- testing: -1 - 4294967294 --- +int(-4294967295) +--- testing: -1 - 4294967295 --- +int(-4294967296) +--- testing: -1 - 4294967293 --- +int(-4294967294) +--- testing: -1 - 9223372036854775806 --- +int(-9223372036854775807) +--- testing: -1 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -1 - -9223372036854775807 --- +int(9223372036854775806) +--- testing: -1 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 7 - 9223372036854775807 --- +int(-9223372036854775800) +--- testing: 7 - -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 7 - 2147483647 --- +int(-2147483640) +--- testing: 7 - -2147483648 --- +int(2147483655) +--- testing: 7 - 9223372034707292160 --- +int(-9223372034707292153) +--- testing: 7 - -9223372034707292160 --- +int(9223372034707292167) +--- testing: 7 - 2147483648 --- +int(-2147483641) +--- testing: 7 - -2147483649 --- +int(2147483656) +--- testing: 7 - 4294967294 --- +int(-4294967287) +--- testing: 7 - 4294967295 --- +int(-4294967288) +--- testing: 7 - 4294967293 --- +int(-4294967286) +--- testing: 7 - 9223372036854775806 --- +int(-9223372036854775799) +--- testing: 7 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 7 - -9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 7 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 9 - 9223372036854775807 --- +int(-9223372036854775798) +--- testing: 9 - -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 9 - 2147483647 --- +int(-2147483638) +--- testing: 9 - -2147483648 --- +int(2147483657) +--- testing: 9 - 9223372034707292160 --- +int(-9223372034707292151) +--- testing: 9 - -9223372034707292160 --- +int(9223372034707292169) +--- testing: 9 - 2147483648 --- +int(-2147483639) +--- testing: 9 - -2147483649 --- +int(2147483658) +--- testing: 9 - 4294967294 --- +int(-4294967285) +--- testing: 9 - 4294967295 --- +int(-4294967286) +--- testing: 9 - 4294967293 --- +int(-4294967284) +--- testing: 9 - 9223372036854775806 --- +int(-9223372036854775797) +--- testing: 9 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 9 - -9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 9 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 65 - 9223372036854775807 --- +int(-9223372036854775742) +--- testing: 65 - -9223372036854775808 --- +float(9.2233720368548E+18) +--- testing: 65 - 2147483647 --- +int(-2147483582) +--- testing: 65 - -2147483648 --- +int(2147483713) +--- testing: 65 - 9223372034707292160 --- +int(-9223372034707292095) +--- testing: 65 - -9223372034707292160 --- +int(9223372034707292225) +--- testing: 65 - 2147483648 --- +int(-2147483583) +--- testing: 65 - -2147483649 --- +int(2147483714) +--- testing: 65 - 4294967294 --- +int(-4294967229) +--- testing: 65 - 4294967295 --- +int(-4294967230) +--- testing: 65 - 4294967293 --- +int(-4294967228) +--- testing: 65 - 9223372036854775806 --- +int(-9223372036854775741) +--- testing: 65 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: 65 - -9223372036854775807 --- +float(9.2233720368548E+18) +--- testing: 65 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: -44 - 9223372036854775807 --- +float(-9.2233720368548E+18) +--- testing: -44 - -9223372036854775808 --- +int(9223372036854775764) +--- testing: -44 - 2147483647 --- +int(-2147483691) +--- testing: -44 - -2147483648 --- +int(2147483604) +--- testing: -44 - 9223372034707292160 --- +int(-9223372034707292204) +--- testing: -44 - -9223372034707292160 --- +int(9223372034707292116) +--- testing: -44 - 2147483648 --- +int(-2147483692) +--- testing: -44 - -2147483649 --- +int(2147483605) +--- testing: -44 - 4294967294 --- +int(-4294967338) +--- testing: -44 - 4294967295 --- +int(-4294967339) +--- testing: -44 - 4294967293 --- +int(-4294967337) +--- testing: -44 - 9223372036854775806 --- +float(-9.2233720368548E+18) +--- testing: -44 - 9.2233720368548E+18 --- +float(-9.2233720368548E+18) +--- testing: -44 - -9223372036854775807 --- +int(9223372036854775763) +--- testing: -44 - -9.2233720368548E+18 --- +float(9.2233720368548E+18) +--- testing: 2147483647 - 9223372036854775807 --- +int(-9223372034707292160) +--- testing: 2147483647 - -9223372036854775808 --- +float(9.2233720390023E+18) +--- testing: 2147483647 - 2147483647 --- +int(0) +--- testing: 2147483647 - -2147483648 --- +int(4294967295) +--- testing: 2147483647 - 9223372034707292160 --- +int(-9223372032559808513) +--- testing: 2147483647 - -9223372034707292160 --- +int(9223372036854775807) +--- testing: 2147483647 - 2147483648 --- +int(-1) +--- testing: 2147483647 - -2147483649 --- +int(4294967296) +--- testing: 2147483647 - 4294967294 --- +int(-2147483647) +--- testing: 2147483647 - 4294967295 --- +int(-2147483648) +--- testing: 2147483647 - 4294967293 --- +int(-2147483646) +--- testing: 2147483647 - 9223372036854775806 --- +int(-9223372034707292159) +--- testing: 2147483647 - 9.2233720368548E+18 --- +float(-9.2233720347073E+18) +--- testing: 2147483647 - -9223372036854775807 --- +float(9.2233720390023E+18) +--- testing: 2147483647 - -9.2233720368548E+18 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 - 9223372036854775807 --- +int(0) +--- testing: 9223372036854775807 - -9223372036854775808 --- +float(1.844674407371E+19) +--- testing: 9223372036854775807 - 2147483647 --- +int(9223372034707292160) +--- testing: 9223372036854775807 - -2147483648 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 - 9223372034707292160 --- +int(2147483647) +--- testing: 9223372036854775807 - -9223372034707292160 --- +float(1.8446744071562E+19) +--- testing: 9223372036854775807 - 2147483648 --- +int(9223372034707292159) +--- testing: 9223372036854775807 - -2147483649 --- +float(9.2233720390023E+18) +--- testing: 9223372036854775807 - 4294967294 --- +int(9223372032559808513) +--- testing: 9223372036854775807 - 4294967295 --- +int(9223372032559808512) +--- testing: 9223372036854775807 - 4294967293 --- +int(9223372032559808514) +--- testing: 9223372036854775807 - 9223372036854775806 --- +int(1) +--- testing: 9223372036854775807 - 9.2233720368548E+18 --- +float(0) +--- testing: 9223372036854775807 - -9223372036854775807 --- +float(1.844674407371E+19) +--- testing: 9223372036854775807 - -9.2233720368548E+18 --- +float(1.844674407371E+19) +===DONE=== diff --git a/tests/lang/operators/subtract_variationStr.phpt b/tests/lang/operators/subtract_variationStr.phpt new file mode 100644 index 0000000..5b5bae2 --- /dev/null +++ b/tests/lang/operators/subtract_variationStr.phpt @@ -0,0 +1,416 @@ +--TEST-- +Test - operator : various numbers as strings +--FILE-- + +===DONE=== +--EXPECT-- +--- testing: '0' - '0' --- +int(0) +--- testing: '0' - '65' --- +int(-65) +--- testing: '0' - '-44' --- +int(44) +--- testing: '0' - '1.2' --- +float(-1.2) +--- testing: '0' - '-7.7' --- +float(7.7) +--- testing: '0' - 'abc' --- +int(0) +--- testing: '0' - '123abc' --- +int(-123) +--- testing: '0' - '123e5' --- +float(-12300000) +--- testing: '0' - '123e5xyz' --- +float(-12300000) +--- testing: '0' - ' 123abc' --- +int(-123) +--- testing: '0' - '123 abc' --- +int(-123) +--- testing: '0' - '123abc ' --- +int(-123) +--- testing: '0' - '3.4a' --- +float(-3.4) +--- testing: '0' - 'a5.9' --- +int(0) +--- testing: '65' - '0' --- +int(65) +--- testing: '65' - '65' --- +int(0) +--- testing: '65' - '-44' --- +int(109) +--- testing: '65' - '1.2' --- +float(63.8) +--- testing: '65' - '-7.7' --- +float(72.7) +--- testing: '65' - 'abc' --- +int(65) +--- testing: '65' - '123abc' --- +int(-58) +--- testing: '65' - '123e5' --- +float(-12299935) +--- testing: '65' - '123e5xyz' --- +float(-12299935) +--- testing: '65' - ' 123abc' --- +int(-58) +--- testing: '65' - '123 abc' --- +int(-58) +--- testing: '65' - '123abc ' --- +int(-58) +--- testing: '65' - '3.4a' --- +float(61.6) +--- testing: '65' - 'a5.9' --- +int(65) +--- testing: '-44' - '0' --- +int(-44) +--- testing: '-44' - '65' --- +int(-109) +--- testing: '-44' - '-44' --- +int(0) +--- testing: '-44' - '1.2' --- +float(-45.2) +--- testing: '-44' - '-7.7' --- +float(-36.3) +--- testing: '-44' - 'abc' --- +int(-44) +--- testing: '-44' - '123abc' --- +int(-167) +--- testing: '-44' - '123e5' --- +float(-12300044) +--- testing: '-44' - '123e5xyz' --- +float(-12300044) +--- testing: '-44' - ' 123abc' --- +int(-167) +--- testing: '-44' - '123 abc' --- +int(-167) +--- testing: '-44' - '123abc ' --- +int(-167) +--- testing: '-44' - '3.4a' --- +float(-47.4) +--- testing: '-44' - 'a5.9' --- +int(-44) +--- testing: '1.2' - '0' --- +float(1.2) +--- testing: '1.2' - '65' --- +float(-63.8) +--- testing: '1.2' - '-44' --- +float(45.2) +--- testing: '1.2' - '1.2' --- +float(0) +--- testing: '1.2' - '-7.7' --- +float(8.9) +--- testing: '1.2' - 'abc' --- +float(1.2) +--- testing: '1.2' - '123abc' --- +float(-121.8) +--- testing: '1.2' - '123e5' --- +float(-12299998.8) +--- testing: '1.2' - '123e5xyz' --- +float(-12299998.8) +--- testing: '1.2' - ' 123abc' --- +float(-121.8) +--- testing: '1.2' - '123 abc' --- +float(-121.8) +--- testing: '1.2' - '123abc ' --- +float(-121.8) +--- testing: '1.2' - '3.4a' --- +float(-2.2) +--- testing: '1.2' - 'a5.9' --- +float(1.2) +--- testing: '-7.7' - '0' --- +float(-7.7) +--- testing: '-7.7' - '65' --- +float(-72.7) +--- testing: '-7.7' - '-44' --- +float(36.3) +--- testing: '-7.7' - '1.2' --- +float(-8.9) +--- testing: '-7.7' - '-7.7' --- +float(0) +--- testing: '-7.7' - 'abc' --- +float(-7.7) +--- testing: '-7.7' - '123abc' --- +float(-130.7) +--- testing: '-7.7' - '123e5' --- +float(-12300007.7) +--- testing: '-7.7' - '123e5xyz' --- +float(-12300007.7) +--- testing: '-7.7' - ' 123abc' --- +float(-130.7) +--- testing: '-7.7' - '123 abc' --- +float(-130.7) +--- testing: '-7.7' - '123abc ' --- +float(-130.7) +--- testing: '-7.7' - '3.4a' --- +float(-11.1) +--- testing: '-7.7' - 'a5.9' --- +float(-7.7) +--- testing: 'abc' - '0' --- +int(0) +--- testing: 'abc' - '65' --- +int(-65) +--- testing: 'abc' - '-44' --- +int(44) +--- testing: 'abc' - '1.2' --- +float(-1.2) +--- testing: 'abc' - '-7.7' --- +float(7.7) +--- testing: 'abc' - 'abc' --- +int(0) +--- testing: 'abc' - '123abc' --- +int(-123) +--- testing: 'abc' - '123e5' --- +float(-12300000) +--- testing: 'abc' - '123e5xyz' --- +float(-12300000) +--- testing: 'abc' - ' 123abc' --- +int(-123) +--- testing: 'abc' - '123 abc' --- +int(-123) +--- testing: 'abc' - '123abc ' --- +int(-123) +--- testing: 'abc' - '3.4a' --- +float(-3.4) +--- testing: 'abc' - 'a5.9' --- +int(0) +--- testing: '123abc' - '0' --- +int(123) +--- testing: '123abc' - '65' --- +int(58) +--- testing: '123abc' - '-44' --- +int(167) +--- testing: '123abc' - '1.2' --- +float(121.8) +--- testing: '123abc' - '-7.7' --- +float(130.7) +--- testing: '123abc' - 'abc' --- +int(123) +--- testing: '123abc' - '123abc' --- +int(0) +--- testing: '123abc' - '123e5' --- +float(-12299877) +--- testing: '123abc' - '123e5xyz' --- +float(-12299877) +--- testing: '123abc' - ' 123abc' --- +int(0) +--- testing: '123abc' - '123 abc' --- +int(0) +--- testing: '123abc' - '123abc ' --- +int(0) +--- testing: '123abc' - '3.4a' --- +float(119.6) +--- testing: '123abc' - 'a5.9' --- +int(123) +--- testing: '123e5' - '0' --- +float(12300000) +--- testing: '123e5' - '65' --- +float(12299935) +--- testing: '123e5' - '-44' --- +float(12300044) +--- testing: '123e5' - '1.2' --- +float(12299998.8) +--- testing: '123e5' - '-7.7' --- +float(12300007.7) +--- testing: '123e5' - 'abc' --- +float(12300000) +--- testing: '123e5' - '123abc' --- +float(12299877) +--- testing: '123e5' - '123e5' --- +float(0) +--- testing: '123e5' - '123e5xyz' --- +float(0) +--- testing: '123e5' - ' 123abc' --- +float(12299877) +--- testing: '123e5' - '123 abc' --- +float(12299877) +--- testing: '123e5' - '123abc ' --- +float(12299877) +--- testing: '123e5' - '3.4a' --- +float(12299996.6) +--- testing: '123e5' - 'a5.9' --- +float(12300000) +--- testing: '123e5xyz' - '0' --- +float(12300000) +--- testing: '123e5xyz' - '65' --- +float(12299935) +--- testing: '123e5xyz' - '-44' --- +float(12300044) +--- testing: '123e5xyz' - '1.2' --- +float(12299998.8) +--- testing: '123e5xyz' - '-7.7' --- +float(12300007.7) +--- testing: '123e5xyz' - 'abc' --- +float(12300000) +--- testing: '123e5xyz' - '123abc' --- +float(12299877) +--- testing: '123e5xyz' - '123e5' --- +float(0) +--- testing: '123e5xyz' - '123e5xyz' --- +float(0) +--- testing: '123e5xyz' - ' 123abc' --- +float(12299877) +--- testing: '123e5xyz' - '123 abc' --- +float(12299877) +--- testing: '123e5xyz' - '123abc ' --- +float(12299877) +--- testing: '123e5xyz' - '3.4a' --- +float(12299996.6) +--- testing: '123e5xyz' - 'a5.9' --- +float(12300000) +--- testing: ' 123abc' - '0' --- +int(123) +--- testing: ' 123abc' - '65' --- +int(58) +--- testing: ' 123abc' - '-44' --- +int(167) +--- testing: ' 123abc' - '1.2' --- +float(121.8) +--- testing: ' 123abc' - '-7.7' --- +float(130.7) +--- testing: ' 123abc' - 'abc' --- +int(123) +--- testing: ' 123abc' - '123abc' --- +int(0) +--- testing: ' 123abc' - '123e5' --- +float(-12299877) +--- testing: ' 123abc' - '123e5xyz' --- +float(-12299877) +--- testing: ' 123abc' - ' 123abc' --- +int(0) +--- testing: ' 123abc' - '123 abc' --- +int(0) +--- testing: ' 123abc' - '123abc ' --- +int(0) +--- testing: ' 123abc' - '3.4a' --- +float(119.6) +--- testing: ' 123abc' - 'a5.9' --- +int(123) +--- testing: '123 abc' - '0' --- +int(123) +--- testing: '123 abc' - '65' --- +int(58) +--- testing: '123 abc' - '-44' --- +int(167) +--- testing: '123 abc' - '1.2' --- +float(121.8) +--- testing: '123 abc' - '-7.7' --- +float(130.7) +--- testing: '123 abc' - 'abc' --- +int(123) +--- testing: '123 abc' - '123abc' --- +int(0) +--- testing: '123 abc' - '123e5' --- +float(-12299877) +--- testing: '123 abc' - '123e5xyz' --- +float(-12299877) +--- testing: '123 abc' - ' 123abc' --- +int(0) +--- testing: '123 abc' - '123 abc' --- +int(0) +--- testing: '123 abc' - '123abc ' --- +int(0) +--- testing: '123 abc' - '3.4a' --- +float(119.6) +--- testing: '123 abc' - 'a5.9' --- +int(123) +--- testing: '123abc ' - '0' --- +int(123) +--- testing: '123abc ' - '65' --- +int(58) +--- testing: '123abc ' - '-44' --- +int(167) +--- testing: '123abc ' - '1.2' --- +float(121.8) +--- testing: '123abc ' - '-7.7' --- +float(130.7) +--- testing: '123abc ' - 'abc' --- +int(123) +--- testing: '123abc ' - '123abc' --- +int(0) +--- testing: '123abc ' - '123e5' --- +float(-12299877) +--- testing: '123abc ' - '123e5xyz' --- +float(-12299877) +--- testing: '123abc ' - ' 123abc' --- +int(0) +--- testing: '123abc ' - '123 abc' --- +int(0) +--- testing: '123abc ' - '123abc ' --- +int(0) +--- testing: '123abc ' - '3.4a' --- +float(119.6) +--- testing: '123abc ' - 'a5.9' --- +int(123) +--- testing: '3.4a' - '0' --- +float(3.4) +--- testing: '3.4a' - '65' --- +float(-61.6) +--- testing: '3.4a' - '-44' --- +float(47.4) +--- testing: '3.4a' - '1.2' --- +float(2.2) +--- testing: '3.4a' - '-7.7' --- +float(11.1) +--- testing: '3.4a' - 'abc' --- +float(3.4) +--- testing: '3.4a' - '123abc' --- +float(-119.6) +--- testing: '3.4a' - '123e5' --- +float(-12299996.6) +--- testing: '3.4a' - '123e5xyz' --- +float(-12299996.6) +--- testing: '3.4a' - ' 123abc' --- +float(-119.6) +--- testing: '3.4a' - '123 abc' --- +float(-119.6) +--- testing: '3.4a' - '123abc ' --- +float(-119.6) +--- testing: '3.4a' - '3.4a' --- +float(0) +--- testing: '3.4a' - 'a5.9' --- +float(3.4) +--- testing: 'a5.9' - '0' --- +int(0) +--- testing: 'a5.9' - '65' --- +int(-65) +--- testing: 'a5.9' - '-44' --- +int(44) +--- testing: 'a5.9' - '1.2' --- +float(-1.2) +--- testing: 'a5.9' - '-7.7' --- +float(7.7) +--- testing: 'a5.9' - 'abc' --- +int(0) +--- testing: 'a5.9' - '123abc' --- +int(-123) +--- testing: 'a5.9' - '123e5' --- +float(-12300000) +--- testing: 'a5.9' - '123e5xyz' --- +float(-12300000) +--- testing: 'a5.9' - ' 123abc' --- +int(-123) +--- testing: 'a5.9' - '123 abc' --- +int(-123) +--- testing: 'a5.9' - '123abc ' --- +int(-123) +--- testing: 'a5.9' - '3.4a' --- +float(-3.4) +--- testing: 'a5.9' - 'a5.9' --- +int(0) +===DONE=== diff --git a/tests/lang/passByReference_001.phpt b/tests/lang/passByReference_001.phpt new file mode 100644 index 0000000..c73eacc --- /dev/null +++ b/tests/lang/passByReference_001.phpt @@ -0,0 +1,37 @@ +--TEST-- +passing of function parameters by reference +--FILE-- + +--EXPECT-- +int(7) +int(15) +int(7) +int(16) +array(1) { + [0]=> + &int(1) +} +int(1) \ No newline at end of file diff --git a/tests/lang/passByReference_002.phpt b/tests/lang/passByReference_002.phpt new file mode 100644 index 0000000..d1968a3 --- /dev/null +++ b/tests/lang/passByReference_002.phpt @@ -0,0 +1,15 @@ +--TEST-- +Attempt to pass a constant by reference +--FILE-- + +--EXPECTF-- +Fatal error: Only variables can be passed by reference in %s on line 8 diff --git a/tests/lang/passByReference_003.phpt b/tests/lang/passByReference_003.phpt new file mode 100644 index 0000000..bbbc564 --- /dev/null +++ b/tests/lang/passByReference_003.phpt @@ -0,0 +1,48 @@ +--TEST-- +Implicit initialisation when passing by reference +--FILE-- + +--EXPECTF-- + +Passing undefined by value + +Notice: Undefined variable: undef1 in %s on line 13 + +Inside passbyVal call: +NULL + +After call + +Notice: Undefined variable: undef1 in %s on line 15 +NULL + +Passing undefined by reference + +Inside passbyRef call: +NULL + +After call +array(1) { + [0]=> + NULL +} diff --git a/tests/lang/passByReference_004.phpt b/tests/lang/passByReference_004.phpt new file mode 100644 index 0000000..e8a7963 --- /dev/null +++ b/tests/lang/passByReference_004.phpt @@ -0,0 +1,21 @@ +--TEST-- +passing the return value from a function by reference +--FILE-- + +--EXPECTF-- +Strict Standards: Only variables should be passed by reference in %s on line 13 +int(5) diff --git a/tests/lang/passByReference_005.phpt b/tests/lang/passByReference_005.phpt new file mode 100644 index 0000000..52ddeeb --- /dev/null +++ b/tests/lang/passByReference_005.phpt @@ -0,0 +1,261 @@ +--TEST-- +Pass uninitialised variables by reference and by value to test implicit initialisation. +--FILE-- +v($u1); +$c->r($u2); +var_dump($u1, $u2); + +unset($u1, $u2); +$c->vv($u1, $u2); +var_dump($u1, $u2); + +unset($u1, $u2); +$c->vr($u1, $u2); +var_dump($u1, $u2); + +unset($u1, $u2); +$c->rv($u1, $u2); +var_dump($u1, $u2); + +unset($u1, $u2); +$c->rr($u1, $u2); +var_dump($u1, $u2); + +?> +--EXPECTF-- + + ---- Pass by ref / pass by val: functions ---- + +Notice: Undefined variable: u1 in %s on line 72 + +Notice: Undefined variable: u1 in %s on line 74 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u1 in %s on line 77 + +Notice: Undefined variable: u2 in %s on line 77 + +Notice: Undefined variable: u1 in %s on line 78 + +Notice: Undefined variable: u2 in %s on line 78 +NULL +NULL + +Notice: Undefined variable: u1 in %s on line 81 + +Notice: Undefined variable: u1 in %s on line 82 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u2 in %s on line 85 + +Notice: Undefined variable: u2 in %s on line 86 +string(11) "Ref changed" +NULL +string(12) "Ref1 changed" +string(12) "Ref2 changed" + + + ---- Pass by ref / pass by val: static method calls ---- + +Notice: Undefined variable: u1 in %s on line 95 + +Strict Standards: Non-static method C::v() should not be called statically in %s on line 95 + +Strict Standards: Non-static method C::r() should not be called statically in %s on line 96 + +Notice: Undefined variable: u1 in %s on line 97 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u1 in %s on line 100 + +Notice: Undefined variable: u2 in %s on line 100 + +Strict Standards: Non-static method C::vv() should not be called statically in %s on line 100 + +Notice: Undefined variable: u1 in %s on line 101 + +Notice: Undefined variable: u2 in %s on line 101 +NULL +NULL + +Notice: Undefined variable: u1 in %s on line 104 + +Strict Standards: Non-static method C::vr() should not be called statically in %s on line 104 + +Notice: Undefined variable: u1 in %s on line 105 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u2 in %s on line 108 + +Strict Standards: Non-static method C::rv() should not be called statically in %s on line 108 + +Notice: Undefined variable: u2 in %s on line 109 +string(11) "Ref changed" +NULL + +Strict Standards: Non-static method C::rr() should not be called statically in %s on line 112 +string(12) "Ref1 changed" +string(12) "Ref2 changed" + + + ---- Pass by ref / pass by val: instance method calls ---- + +Notice: Undefined variable: u1 in %s on line 117 + +Notice: Undefined variable: u1 in %s on line 118 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u1 in %s on line 121 + +Notice: Undefined variable: u1 in %s on line 123 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u1 in %s on line 126 + +Notice: Undefined variable: u2 in %s on line 126 + +Notice: Undefined variable: u1 in %s on line 127 + +Notice: Undefined variable: u2 in %s on line 127 +NULL +NULL + +Notice: Undefined variable: u1 in %s on line 130 + +Notice: Undefined variable: u1 in %s on line 131 +NULL +string(11) "Ref changed" + +Notice: Undefined variable: u2 in %s on line 134 + +Notice: Undefined variable: u2 in %s on line 135 +string(11) "Ref changed" +NULL +string(12) "Ref1 changed" +string(12) "Ref2 changed" \ No newline at end of file diff --git a/tests/lang/passByReference_006.phpt b/tests/lang/passByReference_006.phpt new file mode 100644 index 0000000..248be88 --- /dev/null +++ b/tests/lang/passByReference_006.phpt @@ -0,0 +1,195 @@ +--TEST-- +Pass uninitialised objects and arrays by reference to test implicit initialisation. +--FILE-- +a, $u4->a->b, $u5->a->b->c); +var_dump($u1, $u2, $u3, $u4, $u5); + +echo "\n ---- Pass uninitialised arrays & objects by ref: static method call ---\n"; +unset($u1, $u2, $u3, $u4, $u5); +C::refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); +var_dump($u1, $u2, $u3, $u4, $u5); + +echo "\n\n---- Pass uninitialised arrays & objects by ref: constructor ---\n"; +unset($u1, $u2, $u3, $u4, $u5); +$c = new C($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); +var_dump($u1, $u2, $u3, $u4, $u5); + +echo "\n ---- Pass uninitialised arrays & objects by ref: instance method call ---\n"; +unset($u1, $u2, $u3, $u4, $u5); +$c->refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); +var_dump($u1, $u2, $u3, $u4, $u5); + +?> +--EXPECTF-- + + ---- Pass uninitialised array & object by ref: function call --- +array(1) { + [0]=> + string(12) "Ref1 changed" +} +array(1) { + [0]=> + array(1) { + [1]=> + string(12) "Ref2 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + string(12) "Ref3 changed" +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + string(12) "Ref4 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + object(stdClass)#%d (1) { + ["c"]=> + string(12) "Ref5 changed" + } + } +} + + ---- Pass uninitialised arrays & objects by ref: static method call --- + +Strict Standards: Non-static method C::refs() should not be called statically in %s on line 39 +array(1) { + [0]=> + string(12) "Ref1 changed" +} +array(1) { + [0]=> + array(1) { + [1]=> + string(12) "Ref2 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + string(12) "Ref3 changed" +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + string(12) "Ref4 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + object(stdClass)#%d (1) { + ["c"]=> + string(12) "Ref5 changed" + } + } +} + + +---- Pass uninitialised arrays & objects by ref: constructor --- +array(1) { + [0]=> + string(12) "Ref1 changed" +} +array(1) { + [0]=> + array(1) { + [1]=> + string(12) "Ref2 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + string(12) "Ref3 changed" +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + string(12) "Ref4 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + object(stdClass)#%d (1) { + ["c"]=> + string(12) "Ref5 changed" + } + } +} + + ---- Pass uninitialised arrays & objects by ref: instance method call --- +array(1) { + [0]=> + string(12) "Ref1 changed" +} +array(1) { + [0]=> + array(1) { + [1]=> + string(12) "Ref2 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + string(12) "Ref3 changed" +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + string(12) "Ref4 changed" + } +} +object(stdClass)#%d (1) { + ["a"]=> + object(stdClass)#%d (1) { + ["b"]=> + object(stdClass)#%d (1) { + ["c"]=> + string(12) "Ref5 changed" + } + } +} \ No newline at end of file diff --git a/tests/lang/passByReference_007.phpt b/tests/lang/passByReference_007.phpt new file mode 100644 index 0000000..558ceae --- /dev/null +++ b/tests/lang/passByReference_007.phpt @@ -0,0 +1,105 @@ +--TEST-- +Pass function and method calls by reference and by value. +--FILE-- +returnVal()); +var_dump($a); + +echo "Pass a method call that returns a reference:\n"; +$a = "original"; +foo($myC->returnReference()); +var_dump($a); + +?> +--EXPECTF-- +Pass a function call that returns a value: + +Strict Standards: Only variables should be passed by reference in %s on line 44 +string(8) "original" +string(8) "original" +Pass a function call that returns a reference: +string(8) "original" +string(7) "changed" + +Pass a static method call that returns a value: + +Strict Standards: Only variables should be passed by reference in %s on line 55 +string(8) "original" +string(8) "original" +Pass a static method call that returns a reference: +string(8) "original" +string(7) "changed" + +Pass a method call that returns a value: + +Strict Standards: Only variables should be passed by reference in %s on line 67 +string(8) "original" +string(8) "original" +Pass a method call that returns a reference: +string(8) "original" +string(7) "changed" \ No newline at end of file diff --git a/tests/lang/passByReference_008.phpt b/tests/lang/passByReference_008.phpt new file mode 100644 index 0000000..3685217 --- /dev/null +++ b/tests/lang/passByReference_008.phpt @@ -0,0 +1,40 @@ +--TEST-- +Pass same variable by ref and by value. +--FILE-- + +--EXPECTF-- + + +-- Val, Ref -- +string(10) "original.a" +string(10) "original.a" +string(9) "changed.y" + + +-- Ref, Val -- +string(10) "original.b" +string(10) "original.b" +string(9) "changed.x" \ No newline at end of file diff --git a/tests/lang/passByReference_009.phpt b/tests/lang/passByReference_009.phpt new file mode 100644 index 0000000..1cbd87d --- /dev/null +++ b/tests/lang/passByReference_009.phpt @@ -0,0 +1,24 @@ +--TEST-- +Assignement as argument +--FILE-- + +--EXPECTF-- +1012 \ No newline at end of file diff --git a/tests/lang/passByReference_010.phpt b/tests/lang/passByReference_010.phpt new file mode 100644 index 0000000..0393cce --- /dev/null +++ b/tests/lang/passByReference_010.phpt @@ -0,0 +1,61 @@ +--TEST-- +Passing assignments by reference +--FILE-- + Pass constant assignment by reference:\n"; +f($a="a.original"); +var_dump($a); + +echo "\n\n---> Pass variable assignment by reference:\n"; +unset($a); +$a = "a.original"; +f($b = $a); +var_dump($a); + +echo "\n\n---> Pass reference assignment by reference:\n"; +unset($a, $b); +$a = "a.original"; +f($b =& $a); +var_dump($a); + +echo "\n\n---> Pass concat assignment by reference:\n"; +unset($a, $b); +$b = "b.original"; +$a = "a.original"; +f($b .= $a); +var_dump($a); + +?> +--EXPECTF-- + + +---> Pass constant assignment by reference: + +Strict Standards: Only variables should be passed by reference in %s on line 9 +string(10) "a.original" +string(10) "a.original" + + +---> Pass variable assignment by reference: + +Strict Standards: Only variables should be passed by reference in %s on line 15 +string(10) "a.original" +string(10) "a.original" + + +---> Pass reference assignment by reference: +string(10) "a.original" +string(9) "a.changed" + + +---> Pass concat assignment by reference: + +Strict Standards: Only variables should be passed by reference in %s on line 28 +string(20) "b.originala.original" +string(10) "a.original" diff --git a/tests/lang/passByReference_012.phpt b/tests/lang/passByReference_012.phpt new file mode 100644 index 0000000..c6ce705 --- /dev/null +++ b/tests/lang/passByReference_012.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test pass by reference semantics +--FILE-- + +===DONE=== +--EXPECTF-- +Strict Standards: Only variables should be passed by reference in %s on line %d +string(3) "two" + +Strict Standards: Only variables should be passed by reference in %s on line %d +string(3) "one" +===DONE=== diff --git a/tests/lang/returnByReference.001.phpt b/tests/lang/returnByReference.001.phpt new file mode 100644 index 0000000..4abc3c7 --- /dev/null +++ b/tests/lang/returnByReference.001.phpt @@ -0,0 +1,20 @@ +--TEST-- +Returning a reference from a function +--FILE-- + +--EXPECT-- +int(7) +int(8) \ No newline at end of file diff --git a/tests/lang/returnByReference.002.phpt b/tests/lang/returnByReference.002.phpt new file mode 100644 index 0000000..3494eb5 --- /dev/null +++ b/tests/lang/returnByReference.002.phpt @@ -0,0 +1,29 @@ +--TEST-- +Returning a reference from a function. +--FILE-- + +--EXPECTF-- + +Strict Standards: Only variables should be assigned by reference in %s on line 13 +string(8) "original" +string(7) "changed" diff --git a/tests/lang/returnByReference.003.phpt b/tests/lang/returnByReference.003.phpt new file mode 100644 index 0000000..04a6338 --- /dev/null +++ b/tests/lang/returnByReference.003.phpt @@ -0,0 +1,55 @@ +--TEST-- +Returning a reference from a function +--FILE-- + 1. Trying to assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &returnConstantByValue(); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &returnConstantByRef(); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &returnVariableByRef(); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- + +---> 1. Trying to assign by reference the return value of a function that returns by value: + +Strict Standards: Only variables should be assigned by reference in %s on line 17 +int(5) +int(100) + +---> 2. Trying to assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 7 +int(5) +int(100) + +---> 3. Trying to assign by reference the return value of a function that returns by ref: +int(5) +int(5) diff --git a/tests/lang/returnByReference.004.phpt b/tests/lang/returnByReference.004.phpt new file mode 100644 index 0000000..f185c12 --- /dev/null +++ b/tests/lang/returnByReference.004.phpt @@ -0,0 +1,57 @@ +--TEST-- +Returning a reference from a static method +--FILE-- + 1. Trying to assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnConstantByValue(); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnConstantByRef(); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnVariableByRef(); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- + +---> 1. Trying to assign by reference the return value of a function that returns by value: + +Strict Standards: Only variables should be assigned by reference in %s on line 19 +int(5) +int(100) + +---> 2. Trying to assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 8 +int(5) +int(100) + +---> 3. Trying to assign by reference the return value of a function that returns by ref: +int(5) +int(5) diff --git a/tests/lang/returnByReference.005.phpt b/tests/lang/returnByReference.005.phpt new file mode 100644 index 0000000..a7b6da2 --- /dev/null +++ b/tests/lang/returnByReference.005.phpt @@ -0,0 +1,58 @@ +--TEST-- +Returning a reference from a method +--FILE-- + 1. Trying to assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnConstantByValue(); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnConstantByRef(); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnVariableByRef(); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- + +---> 1. Trying to assign by reference the return value of a function that returns by value: + +Strict Standards: Only variables should be assigned by reference in %s on line 20 +int(5) +int(100) + +---> 2. Trying to assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 8 +int(5) +int(100) + +---> 3. Trying to assign by reference the return value of a function that returns by ref: +int(5) +int(5) diff --git a/tests/lang/returnByReference.006.phpt b/tests/lang/returnByReference.006.phpt new file mode 100644 index 0000000..4019f3a --- /dev/null +++ b/tests/lang/returnByReference.006.phpt @@ -0,0 +1,60 @@ +--TEST-- +Returning a reference from a function via another function +--INI-- +error_reporting = E_ALL & ~E_STRICT +--FILE-- + 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &returnFunctionCallByRef('returnConstantByValue'); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &returnFunctionCallByRef('returnConstantByRef'); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &returnFunctionCallByRef('returnVariableByRef'); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- +---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value: + +Notice: Only variable references should be returned by reference in %s on line 15 +int(5) +int(100) + +---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 7 +int(5) +int(100) + +---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref: +int(5) +int(5) diff --git a/tests/lang/returnByReference.007.phpt b/tests/lang/returnByReference.007.phpt new file mode 100644 index 0000000..1247e55 --- /dev/null +++ b/tests/lang/returnByReference.007.phpt @@ -0,0 +1,63 @@ +--TEST-- +Returning a reference from a static method via another static method +--INI-- +error_reporting = E_ALL & ~E_STRICT +--FILE-- + 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnFunctionCallByRef('returnConstantByValue'); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnFunctionCallByRef('returnConstantByRef'); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &C::returnFunctionCallByRef('returnVariableByRef'); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- + +---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value: + +Notice: Only variable references should be returned by reference in %s on line 16 +int(5) +int(100) + +---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 8 +int(5) +int(100) + +---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref: +int(5) +int(5) \ No newline at end of file diff --git a/tests/lang/returnByReference.008.phpt b/tests/lang/returnByReference.008.phpt new file mode 100644 index 0000000..d595de2 --- /dev/null +++ b/tests/lang/returnByReference.008.phpt @@ -0,0 +1,64 @@ +--TEST-- +Returning a reference from a non-static method via another non-static method +--INI-- +error_reporting = E_ALL & ~E_STRICT +--FILE-- +$functionToCall(); + } +} +$c = new C; + +echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnFunctionCallByRef('returnConstantByValue'); +$a++; +var_dump($a, $b); + +echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnFunctionCallByRef('returnConstantByRef'); +$a++; +var_dump($a, $b); + +echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n"; +unset($a, $b); +$a = 4; +$b = &$c->returnFunctionCallByRef('returnVariableByRef'); +$a++; +var_dump($a, $b); + +?> +--EXPECTF-- + +---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value: + +Notice: Only variable references should be returned by reference in %s on line 16 +int(5) +int(100) + +---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref: + +Notice: Only variable references should be returned by reference in %s on line 8 +int(5) +int(100) + +---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref: +int(5) +int(5) \ No newline at end of file diff --git a/tests/lang/returnByReference.009.phpt b/tests/lang/returnByReference.009.phpt new file mode 100644 index 0000000..6320375 --- /dev/null +++ b/tests/lang/returnByReference.009.phpt @@ -0,0 +1,39 @@ +--TEST-- +Returning a references returned by another function +--FILE-- + 1. Return a variable by reference -> No warning:\n"; + +var_dump (testReturnVarByRef()); + +echo "\n---> 2. Return a value by reference -> Warning:\n"; + +var_dump (testReturnValByRef()); + +--EXPECTF-- +---> 1. Return a variable by reference -> No warning: +int(1) + +---> 2. Return a value by reference -> Warning: + +Notice: Only variable references should be returned by reference in %s on line %d +int(1) diff --git a/tests/lang/script_tag.phpt b/tests/lang/script_tag.phpt new file mode 100644 index 0000000..1b5c696 --- /dev/null +++ b/tests/lang/script_tag.phpt @@ -0,0 +1,17 @@ +--TEST-- + + + +texto