3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { protected $bar = 'baz'; } $foo = new Foo; $time = microtime(true); for ($i = 0; $i <= 10000; $i++) { $ref = new ReflectionClass($foo); $property = $ref->getProperty('bar'); $property->setAccessible(true); $property->getValue($foo); } echo microtime(true) - $time;
based on Q39Uf
Output for 7.1.0
0.011359930038452
Output for 7.0.14
0.011006116867065
Output for 7.0.6
0.0061581134796143
Output for 7.0.5
0.0057098865509033
Output for 7.0.4
0.0081579685211182
Output for 7.0.3
0.0083019733428955
Output for 7.0.2
0.0092010498046875
Output for 7.0.1
0.0075759887695312
Output for 7.0.0
0.0078840255737305
Output for 5.6.28
0.018838882446289
Output for 5.6.21
0.0095789432525635
Output for 5.6.20
0.012984991073608
Output for 5.6.19
0.010431051254272
Output for 5.6.18
0.0099120140075684
Output for 5.6.17
0.013813018798828
Output for 5.6.16
0.014615058898926
Output for 5.6.15
0.012164115905762
Output for 5.6.14
0.012760877609253
Output for 5.6.13
0.012286901473999
Output for 5.6.12
0.015789985656738
Output for 5.6.11
0.016680002212524
Output for 5.6.10
0.012768030166626
Output for 5.6.9
0.01373291015625
Output for 5.6.8
0.015116930007935
Output for 5.6.7
0.013870000839233
Output for 5.5.35
0.014804840087891
Output for 5.5.34
0.013973951339722
Output for 5.5.33
0.014842987060547
Output for 5.5.32
0.016667127609253
Output for 5.5.31
0.01029109954834
Output for 5.5.30
0.015709161758423
Output for 5.5.29
0.012030124664307
Output for 5.5.28
0.010026216506958
Output for 5.5.27
0.011680841445923
Output for 5.5.26
0.019508123397827
Output for 5.5.25
0.014355897903442
Output for 5.5.24
0.0097770690917969
Output for 5.4.45
0.021100997924805
Output for 5.4.44
0.018337965011597
Output for 5.4.43
0.024533987045288
Output for 5.4.42
0.019989013671875
Output for 5.4.41
0.030831098556519
Output for 5.4.40
0.019627094268799
Output for 5.4.39
0.017100811004639
Output for 5.4.38
0.017601013183594
Output for 5.4.37
0.013106107711792
Output for 5.4.36
0.018689155578613
Output for 5.4.35
0.016781091690063
Output for 5.4.34
0.019145011901855
Output for 5.4.32
0.01425313949585
Output for 5.4.31
0.012692928314209
Output for 5.4.30
0.012012004852295
Output for 5.4.29
0.012898921966553
Output for 5.4.28
0.013134002685547
Output for 5.4.27
0.015410184860229
Output for 5.4.26
0.013998985290527
Output for 5.4.25
0.021090030670166
Output for 5.4.24
0.013952016830444
Output for 5.4.23
0.014053106307983
Output for 5.4.22
0.013293981552124
Output for 5.4.21
0.013437032699585
Output for 5.4.20
0.012857913970947
Output for 5.4.19
0.015439987182617
Output for 5.4.18
0.015520095825195
Output for 5.4.17
0.020831108093262
Output for 5.4.16
0.014328002929688
Output for 5.4.15
0.020123958587646
Output for 5.4.14
0.017558813095093
Output for 5.4.13
0.013727903366089
Output for 5.4.12
0.013077020645142
Output for 5.4.11
0.027837991714478
Output for 5.4.10
0.014815092086792
Output for 5.4.9
0.01449990272522
Output for 5.4.8
0.012994050979614
Output for 5.4.7
0.013226985931396
Output for 5.4.6
0.013488054275513
Output for 5.4.5
0.013985872268677
Output for 5.4.4
0.013414859771729
Output for 5.4.3
0.013934850692749
Output for 5.4.2
0.015245914459229
Output for 5.4.1
0.01366114616394
Output for 5.4.0
0.015628814697266
Output for 5.3.29
0.016588926315308
Output for 5.3.28
0.017692089080811
Output for 5.3.27
0.01783013343811
Output for 5.3.1, 5.3.26
0.016329050064087
Output for 5.3.25
0.017385005950928
Output for 5.3.24
0.020732164382935
Output for 5.3.23
0.017616033554077
Output for 5.3.22
0.018146991729736
Output for 5.3.21
0.019061088562012
Output for 5.3.20
0.020359039306641
Output for 5.3.19
0.018886804580688
Output for 5.3.18
0.017749071121216
Output for 5.3.17
0.018055200576782
Output for 5.3.16
0.018172979354858
Output for 5.3.15
0.025570154190063
Output for 5.3.14
0.018344879150391
Output for 5.3.13
0.015444040298462
Output for 5.3.12
0.015706062316895
Output for 5.3.11
0.017348051071167
Output for 5.3.10
0.017642974853516
Output for 5.3.9
0.023000955581665
Output for 5.3.8
0.016323089599609
Output for 5.3.7
0.017175912857056
Output for 5.3.6
0.016546010971069
Output for 5.3.5
0.021528959274292
Output for 5.3.4
0.016014099121094
Output for 5.3.3
0.016335964202881
Output for 5.3.2
0.017221927642822
Output for 5.3.0
0.01478099822998
Output for 5.0.0 - 5.2.17
Fatal error: Call to undefined method ReflectionProperty::setAccessible() in /in/4PrrQ on line 14
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/4PrrQ on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/4PrrQ on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/4PrrQ on line 5
Process exited with code 255.