/
ini.xml
1226 lines (1223 loc) · 40.2 KB
/
ini.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="opcache.configuration" xmlns="http://docbook.org/ns/docbook">
&reftitle.runtime;
&extension.runtime;
<para>
<table>
<title>OPcache configuration options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody xml:id="opcache.configuration.list">
<row>
<entry><link linkend="ini.opcache.enable">opcache.enable</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.enable-cli">opcache.enable_cli</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Between PHP 7.1.2 and 7.1.6 inclusive, the default was "1"</entry>
</row>
<row>
<entry><link
linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry>
<entry>"128"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.interned-strings-buffer">opcache.interned_strings_buffer</link></entry>
<entry>"8"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.max-accelerated-files">opcache.max_accelerated_files</link></entry>
<entry>"10000"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.max-wasted-percentage">opcache.max_wasted_percentage</link></entry>
<entry>"5"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.use-cwd">opcache.use_cwd</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link></entry>
<entry>"2"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.revalidate-path">opcache.revalidate_path</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.save-comments">opcache.save_comments</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.fast-shutdown">opcache.fast_shutdown</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Removed in PHP 7.2.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.optimization-level">opcache.optimization_level</link></entry>
<entry>"0x7FFEBFFF"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Changed from 0x7FFFBFFF in PHP 7.3.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.inherited-hack">opcache.inherited_hack</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Removed in PHP 7.3.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.dups-fix">opcache.dups_fix</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.blacklist-filename">opcache.blacklist_filename</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.max-file-size">opcache.max_file_size</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.consistency-checks">opcache.consistency_checks</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.force-restart-timeout">opcache.force_restart_timeout</link></entry>
<entry>"180"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.error-log">opcache.error_log</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.preferred-memory-model">opcache.preferred_memory_model</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.protect-memory">opcache.protect_memory</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.mmap-base">opcache.mmap_base</link></entry>
<entry>&null;</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.restrict-api">opcache.restrict_api</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link></entry>
<entry>"2"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.huge_code_pages">opcache.huge_code_pages</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.lockfile_path">opcache.lockfile_path</link></entry>
<entry>"/tmp"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 7.1.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.file-cache">opcache.file_cache</link></entry>
<entry>NULL</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.file-cache-only">opcache.file_cache_only</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.file-cache-consistency-checks">opcache.file_cache_consistency_checks</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.opcache.file-cache-fallback">opcache.file_cache_fallback</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Windows only.</entry>
</row>
<row>
<entry><link linkend="ini.opcache.validate-permission">opcache.validate_permission</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 7.0.14</entry>
</row>
<row>
<entry><link linkend="ini.opcache.validate-root">opcache.validate_root</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 7.0.14</entry>
</row>
<row>
<entry><link linkend="ini.opcache.preload">opcache.preload</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 7.4.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.preload-user">opcache.preload_user</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 7.4.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.cache-id">opcache.cache_id</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Windows only. Available as of PHP 7.4.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit">opcache.jit</link></entry>
<entry>"tracing"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-buffer-size">opcache.jit_buffer_size</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-debug">opcache.jit_debug</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-bisect-limit">opcache.jit_bisect_limit</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-prof-threshold">opcache.jit_prof_threshold</link></entry>
<entry>"0.005"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-root-traces">opcache.jit_max_root_traces</link></entry>
<entry>"1024"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-side-traces">opcache.jit_max_side_traces</link></entry>
<entry>"128"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-exit-counters">opcache.jit_max_exit_counters</link></entry>
<entry>"8192"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-hot-loop">opcache.jit_hot_loop</link></entry>
<entry>"64"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-hot-func">opcache.jit_hot_func</link></entry>
<entry>"127"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-hot-return">opcache.jit_hot_return</link></entry>
<entry>"8"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-hot-side-exit">opcache.jit_hot_side_exit</link></entry>
<entry>"8"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-blacklist-root-trace">opcache.jit_blacklist_root_trace</link></entry>
<entry>"16"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-blacklist-side-trace">opcache.jit_blacklist_side_trace</link></entry>
<entry>"8"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-loop-unrolls">opcache.jit_max_loop_unrolls</link></entry>
<entry>"8"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-recursive-calls">opcache.jit_max_recursive_calls</link></entry>
<entry>"2"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-recursive-return">opcache.jit_max_recursive_returns</link></entry>
<entry>"2"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
<row>
<entry><link linkend="ini.opcache.jit-max-polymorphic-calls">opcache.jit_max_polymorphic_calls</link></entry>
<entry>"2"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 8.0.0</entry>
</row>
</tbody>
</tgroup>
</table>
&ini.php.constants;
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.opcache.enable">
<term>
<parameter>opcache.enable</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables the opcode cache. When disabled, code is not optimised or
cached. The setting <literal>opcache.enable</literal> can not be
enabled at runtime through <function>ini_set</function>, it can only
be disabled. Trying to enable it in a script will generate a warning.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.enable-cli">
<term>
<parameter>opcache.enable_cli</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables the opcode cache for the CLI version of PHP.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.memory-consumption">
<term>
<parameter>opcache.memory_consumption</parameter>
<type>int</type>
</term>
<listitem>
<para>
The size of the shared memory storage used by OPcache, in megabytes.
The minimum permissible value is <literal>"8"</literal>,
which is enforced if a smaller value is set.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.interned-strings-buffer">
<term>
<parameter>opcache.interned_strings_buffer</parameter>
<type>int</type>
</term>
<listitem>
<para>
The amount of memory used to store interned strings, in megabytes.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.max-accelerated-files">
<term>
<parameter>opcache.max_accelerated_files</parameter>
<type>int</type>
</term>
<listitem>
<para>
The maximum number of keys (and therefore scripts) in the OPcache hash
table. The actual value used will be the first number in the set of
prime numbers
<literal>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }</literal>
that is greater than or equal to the configured value. The minimum value is 200. The maximum
value is 1000000.
Values outside of this range are clamped to the permissible range.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.max-wasted-percentage">
<term>
<parameter>opcache.max_wasted_percentage</parameter>
<type>int</type>
</term>
<listitem>
<para>
The maximum percentage of wasted memory that is allowed before a restart
is scheduled, if there is insufficient free memory.
The maximum permissible value is <literal>"50"</literal>,
which is enforced if a larger value is set.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.use-cwd">
<term>
<parameter>opcache.use_cwd</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If enabled, OPcache appends the current working directory to the script
key, thereby eliminating possible collisions between files with the same
base name. Disabling this directive improves performance, but may break
existing applications.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.validate-timestamps">
<term>
<parameter>opcache.validate_timestamps</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If enabled, OPcache will check for updated scripts every
<link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link>
seconds. When this directive is disabled, you must reset OPcache
manually via <function>opcache_reset</function>,
<function>opcache_invalidate</function> or by restarting the Web server
for changes to the filesystem to take effect.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.revalidate-freq">
<term>
<parameter>opcache.revalidate_freq</parameter>
<type>int</type>
</term>
<listitem>
<para>
How often to check script timestamps for updates, in seconds.
<literal>0</literal> will result in OPcache checking for updates on
every request.
</para>
<para>
This configuration directive is ignored if
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
is disabled.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.revalidate-path">
<term>
<parameter>opcache.revalidate_path</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If disabled, existing cached files using the same
<link linkend="ini.include-path">include_path</link> will be reused.
Thus, if a file with the same name is elsewhere in the include_path, it
won't be found.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.save-comments">
<term>
<parameter>opcache.save_comments</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If disabled, all documentation comments will be discarded from the
opcode cache to reduce the size of the optimised code. Disabling this
configuration directive may break applications and frameworks that rely
on comment parsing for annotations, including Doctrine, Zend Framework 2
and PHPUnit.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.fast-shutdown">
<term>
<parameter>opcache.fast_shutdown</parameter>
<type>bool</type>
</term>
<listitem>
<para>
If enabled, a fast shutdown sequence is used that doesn't free each
allocated block, but relies on the Zend Engine memory manager to
deallocate the entire set of request variables en masse.
</para>
<para>
This directive has been removed in PHP 7.2.0. A variant of the fast
shutdown sequence has been integrated into PHP and will be automatically
used if possible.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.enable-file-override">
<term>
<parameter>opcache.enable_file_override</parameter>
<type>bool</type>
</term>
<listitem>
<para>
When enabled, the opcode cache will be checked for whether a file has
already been cached when <function>file_exists</function>,
<function>is_file</function> and <function>is_readable</function> are
called. This may increase performance in applications that check the
existence and readability of PHP scripts, but risks returning stale data
if
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
is disabled.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.optimization-level">
<term>
<parameter>opcache.optimization_level</parameter>
<type>int</type>
</term>
<listitem>
<para>
A bitmask that controls which optimisation passes are executed.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.inherited-hack">
<term>
<parameter>opcache.inherited_hack</parameter>
<type>bool</type>
</term>
<listitem>
<para>
This configuration directive is ignored.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.dups-fix">
<term>
<parameter>opcache.dups_fix</parameter>
<type>bool</type>
</term>
<listitem>
<para>
This hack should only be enabled to work around "Cannot redeclare class"
errors.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.blacklist-filename">
<term>
<parameter>opcache.blacklist_filename</parameter>
<type>string</type>
</term>
<listitem>
<para>
The location of the OPcache blacklist file. A blacklist file is a text
file containing the names of files that should not be accelerated, one
per line. Wildcards are allowed, and prefixes can also be provided.
Lines starting with a semi-colon are ignored as comments.
</para>
<para>
A simple blacklist file might look as follows:
</para>
<informalexample>
<programlisting>
<![CDATA[
; Matches a specific file.
/var/www/broken.php
; A prefix that matches all files starting with x.
/var/www/x
; A wildcard match.
/var/www/*-broken.php
]]>
</programlisting>
</informalexample>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.max-file-size">
<term>
<parameter>opcache.max_file_size</parameter>
<type>int</type>
</term>
<listitem>
<para>
The maximum file size that will be cached, in bytes. If this is
<literal>0</literal>, all files will be cached.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.consistency-checks">
<term>
<parameter>opcache.consistency_checks</parameter>
<type>int</type>
</term>
<listitem>
<para>
If non-zero, OPcache will verify the cache checksum every N requests,
where N is the value of this configuration directive. This should only
be enabled when debugging, as it will impair performance.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.force-restart-timeout">
<term>
<parameter>opcache.force_restart_timeout</parameter>
<type>int</type>
</term>
<listitem>
<para>
The length of time to wait for a scheduled restart to begin if the cache
isn't active, in seconds. If the timeout is hit, then OPcache assumes
that something is wrong and will kill the processes holding locks on the
cache to permit a restart.
</para>
<para>
If
<link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link>
is set to 2 or above, a warning will be recorded in the error log when
this occurs.
</para>
<para>
This directive is not supported on Windows.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.error-log">
<term>
<parameter>opcache.error_log</parameter>
<type>string</type>
</term>
<listitem>
<para>
The error log for OPcache errors. An empty string is treated the same as
<literal>stderr</literal>, and will result in logs being sent to
standard error (which will be the Web server error log in most cases).
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.log-verbosity-level">
<term>
<parameter>opcache.log_verbosity_level</parameter>
<type>int</type>
</term>
<listitem>
<para>
The log verbosity level. By default, only fatal errors (level 0) and
errors (level 1) are logged. Other levels available are warnings (level
2), information messages (level 3) and debug messages (level 4).
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.preferred-memory-model">
<term>
<parameter>opcache.preferred_memory_model</parameter>
<type>string</type>
</term>
<listitem>
<para>
The preferred memory model for OPcache to use. If left empty, OPcache
will choose the most appropriate model, which is the correct behaviour
in virtually all cases.
</para>
<para>
Possible values include <literal>mmap</literal>, <literal>shm</literal>,
<literal>posix</literal> and <literal>win32</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.protect-memory">
<term>
<parameter>opcache.protect_memory</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Protects shared memory from unexpected writes while executing scripts.
This is useful for internal debugging only.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.mmap-base">
<term>
<parameter>opcache.mmap_base</parameter>
<type>string</type>
</term>
<listitem>
<para>
The base used for shared memory segments on Windows. All PHP processes
have to map shared memory into the same address space. Using this
directive allows "Unable to reattach to base address" errors to be
fixed.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.restrict-api">
<term>
<parameter>opcache.restrict_api</parameter>
<type>string</type>
</term>
<listitem>
<para>
Allows calling OPcache API functions only from PHP scripts which path
is started from specified string. The default "" means no restriction.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.file_update_protection">
<term>
<parameter>opcache.file_update_protection</parameter>
<type>string</type>
</term>
<listitem>
<para>
Prevents caching files that are less than this number of seconds old.
It protects from caching of incompletely updated files. In case all file
updates on your site are atomic, you may increase performance by setting it to "0".
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.huge_code_pages">
<term>
<parameter>opcache.huge_code_pages</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables or disables copying of PHP code (text segment) into HUGE PAGES.
This should improve performance, but requires appropriate OS configuration.
Available on Linux as of PHP 7.0.0, and on FreeBSD as of PHP 7.4.0.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.lockfile_path">
<term>
<parameter>opcache.lockfile_path</parameter>
<type>string</type>
</term>
<listitem>
<para>
Absolute path used to store shared lockfiles (for *nix only)
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.opt_debug_level">
<term>
<parameter>opcache.opt_debug_level</parameter>
<type>string</type>
</term>
<listitem>
<para>
Produces opcode dumps for debugging different stages of optimizations.
0x10000 will output opcodes as the compiler produced them before any optimization occurs
while 0x20000 will output optimized codes.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.file-cache">
<term>
<parameter>opcache.file_cache</parameter>
<type>string</type>
</term>
<listitem>
<para>
Enables and sets the second level cache directory. It should improve
performance when SHM memory is full, at server restart or SHM reset. The
default "" disables file based caching.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.file-cache-only">
<term>
<parameter>opcache.file_cache_only</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables or disables opcode caching in shared memory.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.file-cache-consistency-checks">
<term>
<parameter>opcache.file_cache_consistency_checks</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Enables or disables checksum validation when script loaded from file cache.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.file-cache-fallback">
<term>
<parameter>opcache.file_cache_fallback</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Implies opcache.file_cache_only=1 for a certain process that failed to
reattach to the shared memory (for Windows only). Explicitly enabled file
cache is required.
</para>
<caution>
<simpara>
Disabling this configuration option may prevent processes to start,
and is therefore discouraged.
</simpara>
</caution>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.validate-permission">
<term>
<parameter>opcache.validate_permission</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Validates the cached file permissions against the current user.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.validate-root">
<term>
<parameter>opcache.validate_root</parameter>
<type>bool</type>
</term>
<listitem>
<para>
Prevents name collisions in chroot'ed environments. This should be enabled in
all chroot'ed environments to prevent access to files outside the chroot.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.preload">
<term>
<parameter>opcache.preload</parameter>
<type>string</type>
</term>
<listitem>
<para>
Specifies a PHP script that is going to be compiled and executed at server start-up,
and which may preload other files, either by <function>include</function>ing them or by
using the <function>opcache_compile_file</function> function. All the entities (e.g.
functions and classes) defined in these files will be available to requests out of
the box, until the server is shut down.
</para>
<note>
<para>
Preloading is not supported on Windows.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.preload-user">
<term>
<parameter>opcache.preload_user</parameter>
<type>string</type>
</term>
<listitem>
<para>
Preloading code as root is not allowed for security reasons. This directive
facilitates to let the preloading to be run as another user.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.cache-id">
<term>
<parameter>opcache.cache_id</parameter>
<type>string</type>
</term>
<listitem>
<para>
On Windows, all processes running the same <acronym>PHP</acronym> <acronym>SAPI</acronym>
under the same user account having the same cache ID share a single OPcache instance.
The value of the cache ID can be freely chosen.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.opcache.jit">
<term>
<parameter>opcache.jit</parameter>
<type class="union"><type>string</type><type>int</type></type>
</term>
<listitem>
<para>
For typical usage, this option accepts one of four string values:
</para>
<simplelist>
<member><literal>disable</literal>: Completely disabled, cannot be enabled at runtime.</member>
<member><literal>off</literal>: Disabled, but can be enabled at runtime.</member>
<member>
<literal>tracing</literal>/<literal>on</literal>: Use tracing JIT.
Enabled by default and recommended for most users.
</member>
<member><literal>function</literal>: Use function JIT.</member>
</simplelist>
<para>
For advanced usage, this option accepts a 4-digit integer <literal>CRTO</literal>, where the digits mean:
<variablelist>
<varlistentry>
<term><literal>C</literal> (CPU-specific optimization flags)</term>
<listitem>
<simplelist>
<member><literal>0</literal>: Disable CPU-specific optimization.</member>
<member><literal>1</literal>: Enable use of AVX, if the CPU supports it.</member>
</simplelist>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>R</literal> (register allocation)</term>
<listitem>
<simplelist>
<member><literal>0</literal>: Don't perform register allocation.</member>
<member><literal>1</literal>: Perform block-local register allocation.</member>
<member><literal>2</literal>: Perform global register allocation.</member>
</simplelist>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>T</literal> (trigger)</term>
<listitem>
<simplelist>
<member><literal>0</literal>: Compile all functions on script load.</member>
<member><literal>1</literal>: Compile functions on first execution.</member>
<member>
<literal>2</literal>: Profile functions on first request and compile
the hottest functions afterwards.
</member>
<member><literal>3</literal>: Profile on the fly and compile hot functions.</member>
<member><literal>4</literal>: Currently unused.</member>
<member>
<literal>5</literal>: Use tracing JIT. Profile on the fly and
compile traces for hot code segments.
</member>
</simplelist>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>O</literal> (optimization level)</term>
<listitem>
<simplelist>
<member><literal>0</literal>: No JIT.</member>
<member><literal>1</literal>: Minimal JIT (call standard VM handlers).</member>
<member><literal>2</literal>: Inline VM handlers.</member>
<member><literal>3</literal>: Use type inference.</member>
<member><literal>4</literal>: Use call graph.</member>
<member><literal>5</literal>: Optimize whole script.</member>
</simplelist>
</listitem>
</varlistentry>