1--TEST-- 2Test the error cases of stream_context_create() 3--FILE-- 4<?php 5try { 6 stream_context_create(['ssl' => "abc"]); 7} catch (ValueError $exception) { 8 echo $exception->getMessage() . "\n"; 9} 10 11try { 12 stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => ['ssl' => "abc"]]); 13} catch (ValueError $exception) { 14 echo $exception->getMessage() . "\n"; 15} 16 17try { 18 stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => false]); 19} catch (TypeError $exception) { 20 echo $exception->getMessage() . "\n"; 21} 22?> 23--EXPECT-- 24Options should have the form ["wrappername"]["optionname"] = $value 25Options should have the form ["wrappername"]["optionname"] = $value 26Invalid stream/context parameter 27