@@ -191,7 +191,7 @@ int zend_startup_builtin_functions(void) /* {{{ */
191
191
ZEND_FUNCTION (zend_version )
192
192
{
193
193
if (zend_parse_parameters_none () == FAILURE ) {
194
- return ;
194
+ RETURN_THROWS () ;
195
195
}
196
196
197
197
RETURN_STRINGL (ZEND_VERSION , sizeof (ZEND_VERSION )- 1 );
@@ -204,7 +204,7 @@ ZEND_FUNCTION(zend_version)
204
204
ZEND_FUNCTION (gc_mem_caches )
205
205
{
206
206
if (zend_parse_parameters_none () == FAILURE ) {
207
- return ;
207
+ RETURN_THROWS () ;
208
208
}
209
209
210
210
RETURN_LONG (zend_mm_gc (zend_mm_get_heap ()));
@@ -217,7 +217,7 @@ ZEND_FUNCTION(gc_mem_caches)
217
217
ZEND_FUNCTION (gc_collect_cycles )
218
218
{
219
219
if (zend_parse_parameters_none () == FAILURE ) {
220
- return ;
220
+ RETURN_THROWS () ;
221
221
}
222
222
223
223
RETURN_LONG (gc_collect_cycles ());
@@ -229,7 +229,7 @@ ZEND_FUNCTION(gc_collect_cycles)
229
229
ZEND_FUNCTION (gc_enabled )
230
230
{
231
231
if (zend_parse_parameters_none () == FAILURE ) {
232
- return ;
232
+ RETURN_THROWS () ;
233
233
}
234
234
235
235
RETURN_BOOL (gc_enabled ());
@@ -243,7 +243,7 @@ ZEND_FUNCTION(gc_enable)
243
243
zend_string * key ;
244
244
245
245
if (zend_parse_parameters_none () == FAILURE ) {
246
- return ;
246
+ RETURN_THROWS () ;
247
247
}
248
248
249
249
key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
@@ -259,7 +259,7 @@ ZEND_FUNCTION(gc_disable)
259
259
zend_string * key ;
260
260
261
261
if (zend_parse_parameters_none () == FAILURE ) {
262
- return ;
262
+ RETURN_THROWS () ;
263
263
}
264
264
265
265
key = zend_string_init ("zend.enable_gc" , sizeof ("zend.enable_gc" )- 1 , 0 );
@@ -275,7 +275,7 @@ ZEND_FUNCTION(gc_status)
275
275
zend_gc_status status ;
276
276
277
277
if (zend_parse_parameters_none () == FAILURE ) {
278
- return ;
278
+ RETURN_THROWS () ;
279
279
}
280
280
281
281
zend_gc_get_status (& status );
@@ -296,7 +296,7 @@ ZEND_FUNCTION(func_num_args)
296
296
zend_execute_data * ex = EX (prev_execute_data );
297
297
298
298
if (zend_parse_parameters_none () == FAILURE ) {
299
- return ;
299
+ RETURN_THROWS () ;
300
300
}
301
301
302
302
if (ZEND_CALL_INFO (ex ) & ZEND_CALL_CODE ) {
@@ -322,7 +322,7 @@ ZEND_FUNCTION(func_get_arg)
322
322
zend_execute_data * ex ;
323
323
324
324
if (zend_parse_parameters (ZEND_NUM_ARGS (), "l" , & requested_offset ) == FAILURE ) {
325
- return ;
325
+ RETURN_THROWS () ;
326
326
}
327
327
328
328
if (requested_offset < 0 ) {
@@ -735,7 +735,7 @@ ZEND_FUNCTION(get_class)
735
735
zval * obj = NULL ;
736
736
737
737
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|o" , & obj ) == FAILURE ) {
738
- return ;
738
+ RETURN_THROWS () ;
739
739
}
740
740
741
741
if (!obj ) {
@@ -760,7 +760,7 @@ ZEND_FUNCTION(get_called_class)
760
760
zend_class_entry * called_scope ;
761
761
762
762
if (zend_parse_parameters_none () == FAILURE ) {
763
- return ;
763
+ RETURN_THROWS () ;
764
764
}
765
765
766
766
called_scope = zend_get_called_scope (execute_data );
@@ -784,7 +784,7 @@ ZEND_FUNCTION(get_parent_class)
784
784
zend_class_entry * ce = NULL ;
785
785
786
786
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|z" , & arg ) == FAILURE ) {
787
- return ;
787
+ RETURN_THROWS () ;
788
788
}
789
789
790
790
if (!ZEND_NUM_ARGS ()) {
@@ -933,7 +933,7 @@ ZEND_FUNCTION(get_class_vars)
933
933
zend_class_entry * ce , * scope ;
934
934
935
935
if (zend_parse_parameters (ZEND_NUM_ARGS (), "S" , & class_name ) == FAILURE ) {
936
- return ;
936
+ RETURN_THROWS () ;
937
937
}
938
938
939
939
ce = zend_lookup_class (class_name );
@@ -1079,7 +1079,7 @@ ZEND_FUNCTION(get_class_methods)
1079
1079
zend_string * key ;
1080
1080
1081
1081
if (zend_parse_parameters (ZEND_NUM_ARGS (), "z" , & klass ) == FAILURE ) {
1082
- return ;
1082
+ RETURN_THROWS () ;
1083
1083
}
1084
1084
1085
1085
if (Z_TYPE_P (klass ) == IS_OBJECT ) {
@@ -1185,7 +1185,7 @@ ZEND_FUNCTION(property_exists)
1185
1185
zend_property_info * property_info ;
1186
1186
1187
1187
if (zend_parse_parameters (ZEND_NUM_ARGS (), "zS" , & object , & property ) == FAILURE ) {
1188
- return ;
1188
+ RETURN_THROWS () ;
1189
1189
}
1190
1190
1191
1191
if (property == NULL ) {
@@ -1322,7 +1322,7 @@ ZEND_FUNCTION(class_alias)
1322
1322
zend_bool autoload = 1 ;
1323
1323
1324
1324
if (zend_parse_parameters (ZEND_NUM_ARGS (), "Ss|b" , & class_name , & alias_name , & alias_name_len , & autoload ) == FAILURE ) {
1325
- return ;
1325
+ RETURN_THROWS () ;
1326
1326
}
1327
1327
1328
1328
ce = zend_lookup_class_ex (class_name , NULL , !autoload ? ZEND_FETCH_CLASS_NO_AUTOLOAD : 0 );
@@ -1353,7 +1353,7 @@ ZEND_FUNCTION(get_included_files)
1353
1353
zend_string * entry ;
1354
1354
1355
1355
if (zend_parse_parameters_none () == FAILURE ) {
1356
- return ;
1356
+ RETURN_THROWS () ;
1357
1357
}
1358
1358
1359
1359
array_init (return_value );
@@ -1374,7 +1374,7 @@ ZEND_FUNCTION(trigger_error)
1374
1374
size_t message_len ;
1375
1375
1376
1376
if (zend_parse_parameters (ZEND_NUM_ARGS (), "s|l" , & message , & message_len , & error_type ) == FAILURE ) {
1377
- return ;
1377
+ RETURN_THROWS () ;
1378
1378
}
1379
1379
1380
1380
switch (error_type ) {
@@ -1402,7 +1402,7 @@ ZEND_FUNCTION(set_error_handler)
1402
1402
zend_long error_type = E_ALL ;
1403
1403
1404
1404
if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|l" , & error_handler , & error_type ) == FAILURE ) {
1405
- return ;
1405
+ RETURN_THROWS () ;
1406
1406
}
1407
1407
1408
1408
if (Z_TYPE_P (error_handler ) != IS_NULL ) { /* NULL == unset */
@@ -1437,7 +1437,7 @@ ZEND_FUNCTION(set_error_handler)
1437
1437
ZEND_FUNCTION (restore_error_handler )
1438
1438
{
1439
1439
if (zend_parse_parameters_none () == FAILURE ) {
1440
- return ;
1440
+ RETURN_THROWS () ;
1441
1441
}
1442
1442
1443
1443
if (Z_TYPE (EG (user_error_handler )) != IS_UNDEF ) {
@@ -1469,7 +1469,7 @@ ZEND_FUNCTION(set_exception_handler)
1469
1469
zval * exception_handler ;
1470
1470
1471
1471
if (zend_parse_parameters (ZEND_NUM_ARGS (), "z" , & exception_handler ) == FAILURE ) {
1472
- return ;
1472
+ RETURN_THROWS () ;
1473
1473
}
1474
1474
1475
1475
if (Z_TYPE_P (exception_handler ) != IS_NULL ) { /* NULL == unset */
@@ -1502,7 +1502,7 @@ ZEND_FUNCTION(set_exception_handler)
1502
1502
ZEND_FUNCTION (restore_exception_handler )
1503
1503
{
1504
1504
if (zend_parse_parameters_none () == FAILURE ) {
1505
- return ;
1505
+ RETURN_THROWS () ;
1506
1506
}
1507
1507
1508
1508
if (Z_TYPE (EG (user_exception_handler )) != IS_UNDEF ) {
@@ -1535,7 +1535,7 @@ static inline void get_declared_class_impl(INTERNAL_FUNCTION_PARAMETERS, int fla
1535
1535
zend_class_entry * ce ;
1536
1536
1537
1537
if (zend_parse_parameters_none () == FAILURE ) {
1538
- return ;
1538
+ RETURN_THROWS () ;
1539
1539
}
1540
1540
1541
1541
array_init (return_value );
@@ -1585,7 +1585,7 @@ ZEND_FUNCTION(get_defined_functions)
1585
1585
char * disable_functions = NULL ;
1586
1586
1587
1587
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & exclude_disabled ) == FAILURE ) {
1588
- return ;
1588
+ RETURN_THROWS () ;
1589
1589
}
1590
1590
1591
1591
array_init (& internal );
@@ -1654,7 +1654,7 @@ ZEND_FUNCTION(get_resource_type)
1654
1654
zval * z_resource_type ;
1655
1655
1656
1656
if (zend_parse_parameters (ZEND_NUM_ARGS (), "r" , & z_resource_type ) == FAILURE ) {
1657
- return ;
1657
+ RETURN_THROWS () ;
1658
1658
}
1659
1659
1660
1660
resource_type = zend_rsrc_list_get_rsrc_type (Z_RES_P (z_resource_type ));
@@ -1676,7 +1676,7 @@ ZEND_FUNCTION(get_resources)
1676
1676
zval * val ;
1677
1677
1678
1678
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|S" , & type ) == FAILURE ) {
1679
- return ;
1679
+ RETURN_THROWS () ;
1680
1680
}
1681
1681
1682
1682
if (!type ) {
@@ -1729,7 +1729,7 @@ ZEND_FUNCTION(get_loaded_extensions)
1729
1729
zend_bool zendext = 0 ;
1730
1730
1731
1731
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & zendext ) == FAILURE ) {
1732
- return ;
1732
+ RETURN_THROWS () ;
1733
1733
}
1734
1734
1735
1735
array_init (return_value );
@@ -1753,7 +1753,7 @@ ZEND_FUNCTION(get_defined_constants)
1753
1753
zend_bool categorize = 0 ;
1754
1754
1755
1755
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & categorize ) == FAILURE ) {
1756
- return ;
1756
+ RETURN_THROWS () ;
1757
1757
}
1758
1758
1759
1759
array_init (return_value );
@@ -1939,7 +1939,7 @@ ZEND_FUNCTION(debug_print_backtrace)
1939
1939
zend_long limit = 0 ;
1940
1940
1941
1941
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|ll" , & options , & limit ) == FAILURE ) {
1942
- return ;
1942
+ RETURN_THROWS () ;
1943
1943
}
1944
1944
1945
1945
ZVAL_UNDEF (& arg_array );
@@ -2327,7 +2327,7 @@ ZEND_FUNCTION(debug_backtrace)
2327
2327
zend_long limit = 0 ;
2328
2328
2329
2329
if (zend_parse_parameters (ZEND_NUM_ARGS (), "|ll" , & options , & limit ) == FAILURE ) {
2330
- return ;
2330
+ RETURN_THROWS () ;
2331
2331
}
2332
2332
2333
2333
zend_fetch_debug_backtrace (return_value , 1 , options , limit );
@@ -2342,7 +2342,7 @@ ZEND_FUNCTION(extension_loaded)
2342
2342
zend_string * lcname ;
2343
2343
2344
2344
if (zend_parse_parameters (ZEND_NUM_ARGS (), "S" , & extension_name ) == FAILURE ) {
2345
- return ;
2345
+ RETURN_THROWS () ;
2346
2346
}
2347
2347
2348
2348
lcname = zend_string_tolower (extension_name );
@@ -2366,7 +2366,7 @@ ZEND_FUNCTION(get_extension_funcs)
2366
2366
zend_function * zif ;
2367
2367
2368
2368
if (zend_parse_parameters (ZEND_NUM_ARGS (), "S" , & extension_name ) == FAILURE ) {
2369
- return ;
2369
+ RETURN_THROWS () ;
2370
2370
}
2371
2371
if (strncasecmp (ZSTR_VAL (extension_name ), "zend" , sizeof ("zend" ))) {
2372
2372
lcname = zend_string_tolower (extension_name );
0 commit comments