File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1377,7 +1377,14 @@ public function getFramelessDeclaration(FuncInfo $funcInfo): ?string {
1377
1377
return null ;
1378
1378
}
1379
1379
1380
+ $ php84MinimumCompatibility = $ this ->minimumPhpVersionIdCompatibility === null || $ this ->minimumPhpVersionIdCompatibility >= PHP_84_VERSION_ID ;
1381
+
1380
1382
$ code = '' ;
1383
+
1384
+ if (!$ php84MinimumCompatibility ) {
1385
+ $ code .= "#if (PHP_VERSION_ID >= " . PHP_84_VERSION_ID . ") \n" ;
1386
+ }
1387
+
1381
1388
foreach ($ this ->framelessFunctionInfos as $ framelessFunctionInfo ) {
1382
1389
$ code .= "ZEND_FRAMELESS_FUNCTION( {$ this ->name ->getFunctionName ()}, {$ framelessFunctionInfo ->arity }); \n" ;
1383
1390
}
@@ -1388,6 +1395,11 @@ public function getFramelessDeclaration(FuncInfo $funcInfo): ?string {
1388
1395
}
1389
1396
$ code .= "\t{ 0 }, \n" ;
1390
1397
$ code .= "}; \n" ;
1398
+
1399
+ if (!$ php84MinimumCompatibility ) {
1400
+ $ code .= "#endif \n" ;
1401
+ }
1402
+
1391
1403
return $ code ;
1392
1404
}
1393
1405
You can’t perform that action at this time.
0 commit comments